diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 11:59:17 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 11:59:17 -0400 |
commit | feb89a44ddf5f93bc476ca29cd02257aea47dc06 (patch) | |
tree | bcf34e69a481450864911f6dc35f6117eded5fbc /apworld/client/pauseMenu.gd | |
parent | b9147997260a6e9ebe291353978830c8741711b9 (diff) | |
download | lingo2-archipelago-feb89a44ddf5f93bc476ca29cd02257aea47dc06.tar.gz lingo2-archipelago-feb89a44ddf5f93bc476ca29cd02257aea47dc06.tar.bz2 lingo2-archipelago-feb89a44ddf5f93bc476ca29cd02257aea47dc06.zip |
Make minimap toggleable
Diffstat (limited to 'apworld/client/pauseMenu.gd')
-rw-r--r-- | apworld/client/pauseMenu.gd | 20 |
1 files changed, 20 insertions, 0 deletions
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" | |||
2 | 2 | ||
3 | var compass_button | 3 | var compass_button |
4 | var locations_button | 4 | var locations_button |
5 | var minimap_button | ||
5 | 6 | ||
6 | 7 | ||
7 | func _ready(): | 8 | func _ready(): |
@@ -29,6 +30,15 @@ func _ready(): | |||
29 | locations_button.pressed.connect(_toggle_locations) | 30 | locations_button.pressed.connect(_toggle_locations) |
30 | ap_panel.add_child(locations_button) | 31 | ap_panel.add_child(locations_button) |
31 | 32 | ||
33 | minimap_button = CheckBox.new() | ||
34 | minimap_button.text = "show minimap" | ||
35 | minimap_button.button_pressed = ap.show_minimap | ||
36 | minimap_button.position = Vector2(65, 300) | ||
37 | minimap_button.theme = preload("res://assets/themes/baseUI.tres") | ||
38 | minimap_button.add_theme_font_size_override("font_size", 60) | ||
39 | minimap_button.pressed.connect(_toggle_minimap) | ||
40 | ap_panel.add_child(minimap_button) | ||
41 | |||
32 | super._ready() | 42 | super._ready() |
33 | 43 | ||
34 | 44 | ||
@@ -69,3 +79,13 @@ func _toggle_locations(): | |||
69 | 79 | ||
70 | var textclient = global.get_node("Textclient") | 80 | var textclient = global.get_node("Textclient") |
71 | textclient.update_locations_visibility() | 81 | textclient.update_locations_visibility() |
82 | |||
83 | |||
84 | func _toggle_minimap(): | ||
85 | var ap = global.get_node("Archipelago") | ||
86 | ap.show_minimap = minimap_button.button_pressed | ||
87 | ap.saveSettings() | ||
88 | |||
89 | var minimap = get_tree().get_root().get_node("scene/Minimap") | ||
90 | if minimap != null: | ||
91 | minimap.visible = ap.show_minimap | ||