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

@@ -21,6 +21,16 @@ M.progress_rich = {
DELAY = 1, -- delay in seconds before main fill
}
M.scroll = {
FRICT_HOLD = 0.8, -- mult. for inert, while touching
FRICT = 0.93, -- mult for free inert
INERT_THRESHOLD = 2, -- speed to stop inertion
INERT_SPEED = 25, -- koef. of inert speed
DEADZONE = 6, -- in px
SOFT_ZONE_SIZE = 160, -- size of outside zone (back move)
BACK_SPEED = 0.2, -- lerp speed
ANIM_SPEED = 0.3, -- gui.animation speed to point
}
function M.get_text(name)
-- override to get text for localized text