diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 11:37:51 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2025-09-27 11:37:51 -0400 |
commit | 86a5188548f80eab6bce3cb6686c49f8448683db (patch) | |
tree | e477fe61c73162fb8eb081489635f3971a3b357a /apworld/client/pauseMenu.gd | |
parent | b524e153ad71e368afbe50da78c4b73c3ac65c5f (diff) | |
download | lingo2-archipelago-86a5188548f80eab6bce3cb6686c49f8448683db.tar.gz lingo2-archipelago-86a5188548f80eab6bce3cb6686c49f8448683db.tar.bz2 lingo2-archipelago-86a5188548f80eab6bce3cb6686c49f8448683db.zip |
Added locations overlay
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 8bc12c6..d1b4bb3 100644 --- a/apworld/client/pauseMenu.gd +++ b/apworld/client/pauseMenu.gd | |||
@@ -1,6 +1,7 @@ | |||
1 | extends "res://scripts/ui/pauseMenu.gd" | 1 | extends "res://scripts/ui/pauseMenu.gd" |
2 | 2 | ||
3 | var compass_button | 3 | var compass_button |
4 | var locations_button | ||
4 | 5 | ||
5 | 6 | ||
6 | func _ready(): | 7 | func _ready(): |
@@ -19,6 +20,15 @@ func _ready(): | |||
19 | compass_button.pressed.connect(_toggle_compass) | 20 | compass_button.pressed.connect(_toggle_compass) |
20 | ap_panel.add_child(compass_button) | 21 | ap_panel.add_child(compass_button) |
21 | 22 | ||
23 | locations_button = CheckBox.new() | ||
24 | locations_button.text = "show locations overlay" | ||
25 | locations_button.button_pressed = ap.show_locations | ||
26 | locations_button.position = Vector2(65, 200) | ||
27 | locations_button.theme = preload("res://assets/themes/baseUI.tres") | ||
28 | locations_button.add_theme_font_size_override("font_size", 60) | ||
29 | locations_button.pressed.connect(_toggle_locations) | ||
30 | ap_panel.add_child(locations_button) | ||
31 | |||
22 | super._ready() | 32 | super._ready() |
23 | 33 | ||
24 | 34 | ||
@@ -32,6 +42,7 @@ func _main_menu(): | |||
32 | global.get_node("Archipelago").disconnect_from_ap() | 42 | global.get_node("Archipelago").disconnect_from_ap() |
33 | global.get_node("Messages").clear() | 43 | global.get_node("Messages").clear() |
34 | global.get_node("Compass").visible = false | 44 | global.get_node("Compass").visible = false |
45 | global.get_node("Textclient").reset() | ||
35 | 46 | ||
36 | autosplitter.reset() | 47 | autosplitter.reset() |
37 | _unpause_game() | 48 | _unpause_game() |
@@ -49,3 +60,12 @@ func _toggle_compass(): | |||
49 | 60 | ||
50 | var compass = global.get_node("Compass") | 61 | var compass = global.get_node("Compass") |
51 | compass.visible = compass_button.button_pressed | 62 | compass.visible = compass_button.button_pressed |
63 | |||
64 | |||
65 | func _toggle_locations(): | ||
66 | var ap = global.get_node("Archipelago") | ||
67 | ap.show_locations = locations_button.button_pressed | ||
68 | ap.saveSettings() | ||
69 | |||
70 | var textclient = global.get_node("Textclient") | ||
71 | textclient.update_locations_visibility() | ||