From feb89a44ddf5f93bc476ca29cd02257aea47dc06 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 27 Sep 2025 11:59:17 -0400 Subject: Make minimap toggleable --- apworld/client/pauseMenu.gd | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'apworld/client/pauseMenu.gd') diff --git a/apworld/client/pauseMenu.gd b/apworld/client/pauseMenu.gd index d1b4bb3..72b45e8 100644 --- a/apworld/client/pauseMenu.gd +++ b/apworld/client/pauseMenu.gd @@ -2,6 +2,7 @@ extends "res://scripts/ui/pauseMenu.gd" var compass_button var locations_button +var minimap_button func _ready(): @@ -29,6 +30,15 @@ func _ready(): locations_button.pressed.connect(_toggle_locations) ap_panel.add_child(locations_button) + minimap_button = CheckBox.new() + minimap_button.text = "show minimap" + minimap_button.button_pressed = ap.show_minimap + minimap_button.position = Vector2(65, 300) + minimap_button.theme = preload("res://assets/themes/baseUI.tres") + minimap_button.add_theme_font_size_override("font_size", 60) + minimap_button.pressed.connect(_toggle_minimap) + ap_panel.add_child(minimap_button) + super._ready() @@ -69,3 +79,13 @@ func _toggle_locations(): var textclient = global.get_node("Textclient") textclient.update_locations_visibility() + + +func _toggle_minimap(): + var ap = global.get_node("Archipelago") + ap.show_minimap = minimap_button.button_pressed + ap.saveSettings() + + var minimap = get_tree().get_root().get_node("scene/Minimap") + if minimap != null: + minimap.visible = ap.show_minimap -- cgit 1.4.1