diff options
author | hop311 <hop3114@gmail.com> | 2024-03-03 17:39:08 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2024-03-03 17:39:08 +0100 |
commit | e2077a0d93be8b2dd48f1ee680809420f1f690d7 (patch) | |
tree | bacc8f4094eff5514a94b3852e9cec9c28391669 /game/src/Game/Menu/LobbyMenu | |
parent | 9ee1940ac3d15aa4c0a87b84d1c4ab8958184f63 (diff) |
Add types to GDScript for-loop variablesfor-loop-types
Diffstat (limited to 'game/src/Game/Menu/LobbyMenu')
-rw-r--r-- | game/src/Game/Menu/LobbyMenu/LobbyMenu.gd | 2 | ||||
-rw-r--r-- | game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/game/src/Game/Menu/LobbyMenu/LobbyMenu.gd b/game/src/Game/Menu/LobbyMenu/LobbyMenu.gd index cc681ba..f747727 100644 --- a/game/src/Game/Menu/LobbyMenu/LobbyMenu.gd +++ b/game/src/Game/Menu/LobbyMenu/LobbyMenu.gd @@ -21,7 +21,7 @@ signal start_date_selected(index : int) @export var delete_dialog : ConfirmationDialog func filter_for_tag(tag : StringName) -> void: - for child in game_select_save_list.get_children(): + for child : Control in game_select_save_list.get_children(): if tag == &"": child.show() else: diff --git a/game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd b/game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd index 646c694..b50ee28 100644 --- a/game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd +++ b/game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd @@ -29,8 +29,7 @@ func set_text(value : StringName) -> void: func _get_minimum_size() -> Vector2: var result := Vector2() - for child in get_children(): - child = child as Control + for child : Control in get_children(): if child == null or not child.visible: continue if child.top_level: @@ -82,8 +81,7 @@ func _notification(what : int) -> void: _size -= style.get_minimum_size() offset += style.get_offset() - for child in get_children(): - child = child as Control + for child : Control in get_children(): if child == null or not child.is_visible_in_tree() or child.top_level: continue |