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:
Maxim Tuprikov
2019-04-07 12:10:16 +03:00
committed by GitHub
parent bd2c06d81b
commit 19a9d27635
10 changed files with 1401 additions and 2 deletions

View File

@@ -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()