From 852ce7b91790bc48aa7340527bd5f5ce53147492 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 6 Dec 2023 10:50:37 +1100 Subject: Add a back button gesture in clickwheel mode --- src/ui/ui_fsm.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ui/ui_fsm.cpp') diff --git a/src/ui/ui_fsm.cpp b/src/ui/ui_fsm.cpp index 539cbc9b..48eca3ff 100644 --- a/src/ui/ui_fsm.cpp +++ b/src/ui/ui_fsm.cpp @@ -245,7 +245,7 @@ auto Lua::PushLuaScreen(lua_State* s) -> int { return 0; } -auto Lua::PopLuaScreen(lua_State* s) -> int { +auto Lua::PopLuaScreen(lua_State *s) -> int { PopScreen(); luavgl_set_root(s, sCurrentScreen->content()); lv_group_set_default(sCurrentScreen->group()); @@ -301,6 +301,10 @@ void Lua::react(const audio::PlaybackFinished&) { playback_playing_->Update(false); } +void Lua::react(const internal::BackPressed& ev) { + PopLuaScreen(sLua->state()); +} + void Browse::entry() {} void Browse::react(const internal::ShowSettingsPage& ev) { -- cgit v1.2.3