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/GameSession/Topbar.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/src/Game/GameSession') diff --git a/game/src/Game/GameSession/Topbar.gd b/game/src/Game/GameSession/Topbar.gd index 82dd4d3..b61af28 100644 --- a/game/src/Game/GameSession/Topbar.gd +++ b/game/src/Game/GameSession/Topbar.gd @@ -67,7 +67,7 @@ func _ready() -> void: NationManagement.Screen.DIPLOMACY : ^"./topbar/topbarbutton_diplomacy", NationManagement.Screen.MILITARY : ^"./topbar/topbarbutton_military" } - for screen in screen_nodepaths: + for screen : NationManagement.Screen in screen_nodepaths: var button : Button = get_button_from_nodepath(screen_nodepaths[screen]) if button: button.pressed.connect( @@ -127,5 +127,5 @@ func _on_decrease_speed_button_pressed() -> void: GameSingleton.decrease_speed() func _on_update_active_nation_management_screen(active_screen : NationManagement.Screen) -> void: - for screen in _nation_management_buttons: + for screen : NationManagement.Screen in _nation_management_buttons: _nation_management_button_textures[screen].set_icon_index(1 + int(screen == active_screen)) -- cgit v1.2.3-56-ga3b1