about summary refs log tree commit diff stats
path: root/apworld/client/pauseMenu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'apworld/client/pauseMenu.gd')
-rw-r--r--apworld/client/pauseMenu.gd20
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
3var compass_button 3var compass_button
4var locations_button 4var locations_button
5var minimap_button
5 6
6 7
7func _ready(): 8func _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
84func _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