summaryrefslogtreecommitdiff
path: root/client/menu/menu.gd
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-12-22 22:45:34 +0100
committermetamuffin <metamuffin@disroot.org>2024-12-22 22:45:34 +0100
commitc4ffbb16598b15be14970382e05c2d1795e13820 (patch)
tree553295aefd62e9f2b1b73d93ff707ad2132b6365 /client/menu/menu.gd
parentb7645692084a38b83ca20c1e66ecdebea541b837 (diff)
downloadhurrycurry-c4ffbb16598b15be14970382e05c2d1795e13820.tar
hurrycurry-c4ffbb16598b15be14970382e05c2d1795e13820.tar.bz2
hurrycurry-c4ffbb16598b15be14970382e05c2d1795e13820.tar.zst
replace server_url global variable with menu data
Diffstat (limited to 'client/menu/menu.gd')
-rw-r--r--client/menu/menu.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/menu/menu.gd b/client/menu/menu.gd
index 7f4a1fb6..2e63a1fe 100644
--- a/client/menu/menu.gd
+++ b/client/menu/menu.gd
@@ -85,12 +85,13 @@ func quit():
await exit()
get_parent().quit()
-func replace_menu(path: String):
+func replace_menu(path: String, data_ = null):
print("Replace menu: ", path)
if popup != null: await popup.exit()
_disable_recursive(self, true)
await _menu_exit()
var new_popup = load(path).instantiate()
+ new_popup.data = data_
get_parent().add_child(new_popup)
if parent_menu != null: parent_menu.popup = new_popup
queue_free()