summaryrefslogtreecommitdiff
path: root/src/ui/ui_fsm.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-12-06 10:50:37 +1100
committerjacqueline <me@jacqueline.id.au>2023-12-06 10:50:37 +1100
commit852ce7b91790bc48aa7340527bd5f5ce53147492 (patch)
tree787eaeca62e437c736ab72c0b3c97010ca472cb2 /src/ui/ui_fsm.cpp
parent5b272af5454a274524b47d91f2387e7bb0b9a0c0 (diff)
downloadtangara-fw-852ce7b91790bc48aa7340527bd5f5ce53147492.tar.gz
Add a back button gesture in clickwheel mode
Diffstat (limited to 'src/ui/ui_fsm.cpp')
-rw-r--r--src/ui/ui_fsm.cpp6
1 files changed, 5 insertions, 1 deletions
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) {