mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
#124 Add set_click_zone to scroll component
This commit is contained in:
parent
fe3ac2e985
commit
7c79985be6
@ -139,3 +139,4 @@ Desc
|
||||
- Input component: rename field _selected_ to _is_selected_ (according to the docs)
|
||||
- Add EmmyLua annotations. See how to use it FAQ
|
||||
- Lang text now can be initialized without default locale id
|
||||
- **#124** Add _set_click_zone_ functon to Scroll component (just link to Drag:set_click_zone inside scroll component)
|
||||
|
@ -263,9 +263,9 @@ end
|
||||
--- Strict drag click area. Useful for
|
||||
-- restrict events outside stencil node
|
||||
-- @tparam Drag self
|
||||
-- @tparam node zone Gui node
|
||||
function Drag.set_click_zone(self, zone)
|
||||
self.click_zone = self:get_node(zone)
|
||||
-- @tparam node node Gui node
|
||||
function Drag.set_click_zone(self, node)
|
||||
self.click_zone = self:get_node(node)
|
||||
end
|
||||
|
||||
|
||||
|
@ -379,6 +379,15 @@ function Scroll.bind_grid(self, grid)
|
||||
end
|
||||
|
||||
|
||||
--- Strict drag scroll area. Useful for
|
||||
-- restrict events outside stencil node
|
||||
-- @tparam Drag self
|
||||
-- @tparam node node Gui node
|
||||
function Scroll.set_click_zone(self, node)
|
||||
self.drag:set_click_zone(node)
|
||||
end
|
||||
|
||||
|
||||
function Scroll._on_scroll_drag(self, dx, dy)
|
||||
local t = self.target_position
|
||||
local b = self.available_pos
|
||||
|
Loading…
x
Reference in New Issue
Block a user