Add simple swipe component

This commit is contained in:
Insality
2020-04-17 20:04:45 +03:00
parent 14a70964c8
commit 3339b00071
8 changed files with 172 additions and 6 deletions

View File

@@ -39,11 +39,24 @@ local function init_top_panel(self)
end
local function init_swipe_control(self)
self.druid:new_swipe("root", function(_, side)
if side == "left" then
on_control_button(self, 1)
end
if side == "right" then
on_control_button(self, -1)
end
end)
end
function init(self)
druid.set_default_style(default_style)
self.druid = druid.new(self)
init_top_panel(self)
init_swipe_control(self)
self.page = 1
main_page.setup_page(self)
text_page.setup_page(self)