From 869ed0544e5a9e9fd35dfd82ed0f8e277c20c6fd Mon Sep 17 00:00:00 2001 From: siliconsniffer <97843108+siliconsniffer@users.noreply.github.com> Date: Wed, 30 Jul 2025 20:44:55 +0200 Subject: [PATCH 1/5] Hide the menu header with touch_gui enabled --- builtin/fstk/tabview.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index 13a96abffa..d435d476c5 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -225,7 +225,14 @@ end local function hide_tabview(self) self.hidden=true - --call on_change as we're not gonna show self tab any longer + -- hide the menu header image as well + if core.settings:get_bool("touch_gui") then + if mm_game_theme and mm_game_theme.clear_single then + mm_game_theme.clear_single("header") + end + end + + -- call on_change as we're not gonna show self tab any longer if self.tablist[self.last_tab_index].on_change ~= nil then self.tablist[self.last_tab_index].on_change("LEAVE", self.current_tab, nil) From 97141ffd41aab6e160f732765e0ef87647f2857f Mon Sep 17 00:00:00 2001 From: siliconsniffer <97843108+siliconsniffer@users.noreply.github.com> Date: Wed, 30 Jul 2025 20:50:45 +0200 Subject: [PATCH 2/5] Restore the menu header explicitly --- builtin/mainmenu/game_theme.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/mainmenu/game_theme.lua b/builtin/mainmenu/game_theme.lua index 7291100255..1a3d29c56b 100644 --- a/builtin/mainmenu/game_theme.lua +++ b/builtin/mainmenu/game_theme.lua @@ -51,6 +51,8 @@ function mm_game_theme.set_game(gamedetails) assert(gamedetails ~= nil) if mm_game_theme.gameid == gamedetails.id then + -- still restore header in case it was cleared + mm_game_theme.set_game_single("header", gamedetails) return end mm_game_theme.gameid = gamedetails.id From 3ae6a64f2079d34e809cafc5acda14513c211369 Mon Sep 17 00:00:00 2001 From: siliconsniffer <97843108+siliconsniffer@users.noreply.github.com> Date: Wed, 6 Aug 2025 10:13:46 +0200 Subject: [PATCH 3/5] Always hide the menu header when calling tabview:hide --- builtin/fstk/tabview.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index d435d476c5..25d70e8602 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -226,10 +226,8 @@ local function hide_tabview(self) self.hidden=true -- hide the menu header image as well - if core.settings:get_bool("touch_gui") then - if mm_game_theme and mm_game_theme.clear_single then - mm_game_theme.clear_single("header") - end + if mm_game_theme and mm_game_theme.clear_single then + mm_game_theme.clear_single("header") end -- call on_change as we're not gonna show self tab any longer From 5491944d2f4ceb6b0b8fe2e0bc6104f6c1ba8d89 Mon Sep 17 00:00:00 2001 From: siliconsniffer <97843108+siliconsniffer@users.noreply.github.com> Date: Sun, 24 Aug 2025 20:00:03 +0200 Subject: [PATCH 4/5] Add bool parameter to tabview:hide() --- builtin/fstk/tabview.lua | 6 ++++-- builtin/mainmenu/tab_local.lua | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index 25d70e8602..47b03d9e67 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -222,11 +222,13 @@ local function set_tab_by_name(self, name) end -------------------------------------------------------------------------------- -local function hide_tabview(self) +local function hide_tabview(self, hide_header) self.hidden=true + if hide_header == nil then hide_header = true end + -- hide the menu header image as well - if mm_game_theme and mm_game_theme.clear_single then + if hide_header and mm_game_theme and mm_game_theme.clear_single then mm_game_theme.clear_single("header") end diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua index 0d0b20ff18..572442b185 100644 --- a/builtin/mainmenu/tab_local.lua +++ b/builtin/mainmenu/tab_local.lua @@ -394,7 +394,7 @@ local function main_button_handler(this, fields, name, tabdata) this.dlg_create_world_closed_at = 0 local create_world_dlg = create_create_world_dlg() create_world_dlg:set_parent(this) - this:hide() + this:hide(false) create_world_dlg:show() return true end @@ -410,7 +410,7 @@ local function main_button_handler(this, fields, name, tabdata) local index = menudata.worldlist:get_raw_index(selected) local delete_world_dlg = create_delete_world_dlg(world.name,index) delete_world_dlg:set_parent(this) - this:hide() + this:hide(false) delete_world_dlg:show() end end @@ -427,7 +427,7 @@ local function main_button_handler(this, fields, name, tabdata) if (configdialog ~= nil) then configdialog:set_parent(this) - this:hide() + this:hide(false) configdialog:show() end end From 2f3cf6b1f042274eee572269e928607b2530e0a8 Mon Sep 17 00:00:00 2001 From: siliconsniffer <97843108+siliconsniffer@users.noreply.github.com> Date: Mon, 25 Aug 2025 09:05:00 +0200 Subject: [PATCH 5/5] Add hide_header into self. --- builtin/fstk/tabview.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index 47b03d9e67..aa4cfc2afd 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -224,6 +224,7 @@ end -------------------------------------------------------------------------------- local function hide_tabview(self, hide_header) self.hidden=true + self.hide_header = hide_header if hide_header == nil then hide_header = true end @@ -296,6 +297,7 @@ function tabview_create(name, size, tabheaderpos) self.tablist = {} self.autosave_tab = false + self.hide_header = false ui.add(self) return self