mirror of
https://github.com/Insality/druid.git
synced 2025-09-28 10:32:20 +02:00
Feature/scroll (#22)
* base scroll implementation * add scroll collection example mofidy scrolls, fix callback calls * unhover button if start swipe notify input components on swipe * add node center offset, calc by pivots modify with with node center scroll (to correct scroll to point) * Refactor, add some docs * fix: set_pos on end on scroll * add gui.animate speed in settings
This commit is contained in:
@@ -76,6 +76,7 @@ function M.on_input(instance, action_id, action)
|
||||
end
|
||||
|
||||
if action.released then
|
||||
set_hover(instance, false)
|
||||
return on_button_release(instance)
|
||||
else
|
||||
set_hover(instance, true)
|
||||
@@ -90,6 +91,13 @@ function M.on_input(instance, action_id, action)
|
||||
end
|
||||
|
||||
|
||||
function M.on_swipe(instance)
|
||||
-- unhover button if start swipe
|
||||
instance.can_action = false
|
||||
set_hover(instance, false)
|
||||
end
|
||||
|
||||
|
||||
function M.tap_scale_animation(instance)
|
||||
ui_animate.scale_to(instance, instance.anim_node, instance.scale_to,
|
||||
function()
|
||||
|
Reference in New Issue
Block a user