diff options
author | Spartan322 <Megacake1234@gmail.com> | 2023-12-23 05:01:51 +0100 |
---|---|---|
committer | George L. Albany <Megacake1234@gmail.com> | 2023-12-24 04:52:36 +0100 |
commit | b6413251a866c76538869b84ed1c9b9852f7c507 (patch) | |
tree | 1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/Menu/OptionMenu/OptionsMenu.gd | |
parent | 50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff) |
Apply type hints to menu scripts
Diffstat (limited to 'game/src/Game/Menu/OptionMenu/OptionsMenu.gd')
-rw-r--r-- | game/src/Game/Menu/OptionMenu/OptionsMenu.gd | 10 |
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() |