From e2077a0d93be8b2dd48f1ee680809420f1f690d7 Mon Sep 17 00:00:00 2001 From: hop311 Date: Sun, 3 Mar 2024 16:39:08 +0000 Subject: Add types to GDScript for-loop variables --- game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'game/src/Game/Menu/LobbyMenu/LobbyPanelButton.gd') 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 -- cgit v1.2.3-56-ga3b1