aboutsummaryrefslogtreecommitdiff
path: root/client/menu/menu_manager.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-06-26 16:33:03 +0200
committertpart <tpart120@proton.me>2024-06-26 16:33:03 +0200
commit677b9c898b0fc3faac2aa505cce438a2b2189265 (patch)
tree78d7739cbd51346b2551bbc5eec6e4dff6e128e0 /client/menu/menu_manager.gd
parent2ce3b759c4cd27dc422924fde991a9de85524be5 (diff)
downloadhurrycurry-677b9c898b0fc3faac2aa505cce438a2b2189265.tar
hurrycurry-677b9c898b0fc3faac2aa505cce438a2b2189265.tar.bz2
hurrycurry-677b9c898b0fc3faac2aa505cce438a2b2189265.tar.zst
Support optionally running activation code with menu manager; Fix shuffling in credits not updating
Diffstat (limited to 'client/menu/menu_manager.gd')
-rw-r--r--client/menu/menu_manager.gd6
1 files changed, 4 insertions, 2 deletions
diff --git a/client/menu/menu_manager.gd b/client/menu/menu_manager.gd
index dc6afce8..1285a7e6 100644
--- a/client/menu/menu_manager.gd
+++ b/client/menu/menu_manager.gd
@@ -28,7 +28,9 @@ func goBack():
func show_menu(menu_name: String):
for k in menus.keys():
if k == menu_name:
- menus[k].visible = true
+ menus[k].show()
+ if menus[k].has_method("prepare"):
+ menus[k].prepare() # Optionally run some code
Global.focus_first_button(menus[k])
else:
- menus[k].visible = false
+ menus[k].hide()