diff options
author | nokoe <nokoe@mailbox.org> | 2024-10-01 14:47:46 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-10-01 14:47:46 +0200 |
commit | b05e19f13280f887df5eaa2e2cc3915c9c748e83 (patch) | |
tree | 39cc32358d229dc3eddd6197b79a27cddd661a92 /client | |
parent | 78c13e68040241f0fb76592e3664de2bc24cc981 (diff) | |
download | hurrycurry-b05e19f13280f887df5eaa2e2cc3915c9c748e83.tar hurrycurry-b05e19f13280f887df5eaa2e2cc3915c9c748e83.tar.bz2 hurrycurry-b05e19f13280f887df5eaa2e2cc3915c9c748e83.tar.zst |
add popup asking for consent to query the registry; fixes #196
Diffstat (limited to 'client')
-rw-r--r-- | client/global.gd | 1 | ||||
-rw-r--r-- | client/menu/play.gd | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/client/global.gd b/client/global.gd index 1d6fb630..6ea4f7dc 100644 --- a/client/global.gd +++ b/client/global.gd @@ -29,6 +29,7 @@ var default_profile := { "character": 0, "last_server_url": "", "tutorial_ingredients_played": [], + "registry_asked": false, "hints": { "has_moved": false, "has_boosted": false, diff --git a/client/menu/play.gd b/client/menu/play.gd index 1abd0bbc..9cf1bbaa 100644 --- a/client/menu/play.gd +++ b/client/menu/play.gd @@ -39,6 +39,18 @@ func _ready(): update_server_list_loading(ServerList.loading) super() + if not Global.get_profile("registry_asked"): + var data := MenuPopup.Data.new() + data.text = tr("c.play.allow_query_registry") + var allow_button := Button.new() + allow_button.text = tr("c.menu.accept") + var deny_button := Button.new() + deny_button.text = tr("c.menu.deny") + allow_button.pressed.connect(func(): Global.set_setting("online.use_registry", true)) + deny_button.pressed.connect(func(): Global.set_setting("online.use_registry", false)) + data.buttons = [deny_button, allow_button] + await submenu("res://menu/popup.tscn", data) + Global.set_profile("registry_asked", true) ServerList.start() func update_server_list(lists: Array[Array]): |