britzl / gooey

Defold GUI system
MIT License
150 stars 22 forks source link

Softcrash when using the gooey.vertical_scrollbar with gooey.dynamic_list #25

Closed Jerakin closed 5 years ago

Jerakin commented 5 years ago

Happens when you do gooey.dynamic_list(...) before gooey.vertical_scrollbar(...) in on_input(..) or init(...) (as if you use update_list(gooey.dynamic_list(...)) on init(...))

dynamic_list will call update_list before gooey.vertical_scrollbar(...) so action will always have been nil.

Workaround is to pass the expected variables in init(...) before update_list like gooey.vertical_scrollbar("scrollbar/handle", "scrollbar/bar", nil, {x=0, y=0})