diff options
| author | dam <dam@gudinoff> | 2022-06-16 01:43:21 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-06-16 01:43:21 +0000 |
| commit | 3026d4b71ded2cfc3123eb92a6a13d4e51e5aa68 (patch) | |
| tree | 952b368a18aaa2ae08f0fb956b6d16205b5c8681 /logic/menu.gd | |
| parent | a4b9a04763bb60c45300a267778f6586e43ce454 (diff) | |
| download | surgery-log-3026d4b71ded2cfc3123eb92a6a13d4e51e5aa68.tar.zst surgery-log-3026d4b71ded2cfc3123eb92a6a13d4e51e5aa68.zip | |
Added settings; Fixed virtual keyboard height bug with hack; Initial support of multiple themes.
Diffstat (limited to 'logic/menu.gd')
| -rw-r--r-- | logic/menu.gd | 8 |
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") |
