aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
diff options
context:
space:
mode:
author George L. Albany <Megacake1234@gmail.com>2023-12-24 19:23:18 +0100
committer GitHub <noreply@github.com>2023-12-24 19:23:18 +0100
commitd26c990d9a5596a3ef3b32ba1cb0f99950cd6d34 (patch)
tree1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/Menu/OptionMenu/OptionsMenu.gd
parent50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff)
parentb6413251a866c76538869b84ed1c9b9852f7c507 (diff)
Merge pull request #178 from Spartan322/add-menu-type-hints
Diffstat (limited to 'game/src/Game/Menu/OptionMenu/OptionsMenu.gd')
-rw-r--r--game/src/Game/Menu/OptionMenu/OptionsMenu.gd10
1 files changed, 5 insertions, 5 deletions
diff --git a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
index 93ef3e4..2b70d1c 100644
--- a/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
+++ b/game/src/Game/Menu/OptionMenu/OptionsMenu.gd
@@ -7,7 +7,7 @@ signal back_button_pressed
@export var _tab_container : TabContainer
-func _ready():
+func _ready() -> void:
_tab_container.set_tab_title(0, "OPTIONS_GENERAL")
_tab_container.set_tab_title(1, "OPTIONS_VIDEO")
_tab_container.set_tab_title(2, "OPTIONS_SOUND")
@@ -41,19 +41,19 @@ func _ready():
button_list.add_child(back_button)
get_viewport().get_window().close_requested.connect(_on_window_close_requested)
_save_overrides.call_deferred()
- Events.Options.save_settings.connect(func(_f): self._save_overrides.call_deferred())
+ Events.Options.save_settings.connect(func(_f : ConfigFile) -> void: self._save_overrides.call_deferred())
-func _notification(what):
+func _notification(what : int) -> void:
match what:
NOTIFICATION_CRASH:
_on_window_close_requested()
-func _input(event):
+func _input(event : InputEvent) -> void:
if self.is_visible_in_tree():
if event.is_action_pressed("ui_cancel"):
_on_back_button_pressed()
-func _on_back_button_pressed():
+func _on_back_button_pressed() -> void:
Events.Options.save_settings_to_file()
back_button_pressed.emit()