1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Add bool parameter to tabview:hide()

This commit is contained in:
siliconsniffer 2025-08-24 20:00:03 +02:00
parent 3ae6a64f20
commit 5491944d2f
2 changed files with 7 additions and 5 deletions

View file

@ -222,11 +222,13 @@ local function set_tab_by_name(self, name)
end end
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
local function hide_tabview(self) local function hide_tabview(self, hide_header)
self.hidden=true self.hidden=true
if hide_header == nil then hide_header = true end
-- hide the menu header image as well -- 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") mm_game_theme.clear_single("header")
end end

View file

@ -394,7 +394,7 @@ local function main_button_handler(this, fields, name, tabdata)
this.dlg_create_world_closed_at = 0 this.dlg_create_world_closed_at = 0
local create_world_dlg = create_create_world_dlg() local create_world_dlg = create_create_world_dlg()
create_world_dlg:set_parent(this) create_world_dlg:set_parent(this)
this:hide() this:hide(false)
create_world_dlg:show() create_world_dlg:show()
return true return true
end end
@ -410,7 +410,7 @@ local function main_button_handler(this, fields, name, tabdata)
local index = menudata.worldlist:get_raw_index(selected) local index = menudata.worldlist:get_raw_index(selected)
local delete_world_dlg = create_delete_world_dlg(world.name,index) local delete_world_dlg = create_delete_world_dlg(world.name,index)
delete_world_dlg:set_parent(this) delete_world_dlg:set_parent(this)
this:hide() this:hide(false)
delete_world_dlg:show() delete_world_dlg:show()
end end
end end
@ -427,7 +427,7 @@ local function main_button_handler(this, fields, name, tabdata)
if (configdialog ~= nil) then if (configdialog ~= nil) then
configdialog:set_parent(this) configdialog:set_parent(this)
this:hide() this:hide(false)
configdialog:show() configdialog:show()
end end
end end