diff options
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 |
commit | d26c990d9a5596a3ef3b32ba1cb0f99950cd6d34 (patch) | |
tree | 1b99c935438692bb2ebadeac412b990c82089b65 /game/src/Game/Menu/MainMenu | |
parent | 50b0b935b0bf0724f40b5140aca85d1830a8b1b3 (diff) | |
parent | b6413251a866c76538869b84ed1c9b9852f7c507 (diff) |
Merge pull request #178 from Spartan322/add-menu-type-hints
Diffstat (limited to 'game/src/Game/Menu/MainMenu')
-rw-r--r-- | game/src/Game/Menu/MainMenu/MainMenu.gd | 16 | ||||
-rw-r--r-- | game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/game/src/Game/Menu/MainMenu/MainMenu.gd b/game/src/Game/Menu/MainMenu/MainMenu.gd index 9d0edc6..cc8841f 100644 --- a/game/src/Game/Menu/MainMenu/MainMenu.gd +++ b/game/src/Game/Menu/MainMenu/MainMenu.gd @@ -9,42 +9,42 @@ var _new_game_button : BaseButton # REQUIREMENTS: # * SS-3 -func _ready(): +func _ready() -> void: _on_new_game_button_visibility_changed() # REQUIREMENTS: # * SS-14 # * UIFUN-32 -func _on_new_game_button_pressed(): +func _on_new_game_button_pressed() -> void: print("Start a new game!") new_game_button_pressed.emit() -func _on_continue_button_pressed(): +func _on_continue_button_pressed() -> void: print("Continue last game!") -func _on_multi_player_button_pressed(): +func _on_multi_player_button_pressed() -> void: print("Have fun with friends!") -func _on_options_button_pressed(): +func _on_options_button_pressed() -> void: print("Check out some options!") options_button_pressed.emit() # REQUIREMENTS # * UI-32 # * UIFUN-36 -func _on_credits_button_pressed(): +func _on_credits_button_pressed() -> void: credits_button_pressed.emit() # REQUIREMENTS # * SS-4 # * UIFUN-3 -func _on_exit_button_pressed(): +func _on_exit_button_pressed() -> void: print("See you later!") get_tree().quit() -func _on_new_game_button_visibility_changed(): +func _on_new_game_button_visibility_changed() -> void: if visible: _new_game_button.grab_focus.call_deferred() diff --git a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd index f401919..c52503c 100644 --- a/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd +++ b/game/src/Game/Menu/MainMenu/ReleaseInfoBox.gd @@ -14,7 +14,7 @@ var _checksum : String = "????" # REQUIREMENTS: # * SS-104, SS-105, SS-106, SS-107 # * UIFUN-97, UIFUN-297, UIFUN-299 -func _ready(): +func _ready() -> void: _version_label.text = _GIT_INFO_.release_name _version_label.tooltip_text = _GIT_INFO_.tag _commit_label.text = _GIT_INFO_.short_hash @@ -23,7 +23,7 @@ func _ready(): _checksum = Checksum.get_checksum_text() _update_checksum_label_text() -func _notification(what : int): +func _notification(what : int) -> void: match what: NOTIFICATION_TRANSLATION_CHANGED: _update_checksum_label_text() @@ -32,11 +32,11 @@ func _update_checksum_label_text() -> void: _checksum_label.tooltip_text = tr("MAINMENU_CHECKSUM").format({ "checksum": _checksum }) _checksum_label.text = "(%s)" % _checksum.substr(0, 4) -func _on_version_label_pressed(): +func _on_version_label_pressed() -> void: DisplayServer.clipboard_set(_GIT_INFO_.tag) -func _on_commit_label_pressed(): +func _on_commit_label_pressed() -> void: DisplayServer.clipboard_set(_GIT_INFO_.commit_hash) -func _on_checksum_label_pressed(): +func _on_checksum_label_pressed() -> void: DisplayServer.clipboard_set(_checksum) |