aboutsummaryrefslogtreecommitdiff
path: root/logic/menu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'logic/menu.gd')
-rw-r--r--logic/menu.gd8
1 files changed, 6 insertions, 2 deletions
diff --git a/logic/menu.gd b/logic/menu.gd
index 4b0b7b3..cc461b9 100644
--- a/logic/menu.gd
+++ b/logic/menu.gd
@@ -2,6 +2,7 @@ extends MenuButton
const LOGS_FILE_PATH: String = "user://logs/godot.log"
const menu_items: Array = [
+ { label = "Toggle Theme", action = "toggle_theme_action" },
{ label = "Import Option Sets", action = "import_option_sets_action" },
{ label = "Export Option Sets", action = "export_option_sets_action" },
{ label = "Clear Option Sets", action = "clear_option_sets_action" },
@@ -11,9 +12,8 @@ const menu_items: Array = [
{ label = "Export App Log", action = "export_app_log_action" },
{ label = "About", action = "about_action" },
]
-const license_font_b612: String = "res://licenses/font_b612.txt"
-const license_godot: String = "res://licenses/godot.txt"
+onready var main := get_node("/root/main") as Control
onready var menu := get_popup() as PopupMenu
onready var popup := get_node("/root/main/popup") as ModalPopup
onready var dialog := get_node("/root/main/dialog") as Dialog
@@ -32,6 +32,10 @@ func id_pressed(id: int):
self.call_deferred(menu_items[id].action)
+func toggle_theme_action():
+ main.toggle_theme()
+
+
func import_option_sets_action():
dialog.setup("All option sets from the dropdown menus will be replaced.", "Continue", "No")
dialog.connect("accepted", self, "import_option_sets_action_accepted")