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/Theme/StyleBoxCombinedTexture.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'game/src/Game/Theme/StyleBoxCombinedTexture.gd') diff --git a/game/src/Game/Theme/StyleBoxCombinedTexture.gd b/game/src/Game/Theme/StyleBoxCombinedTexture.gd index db54da4..1d68363 100644 --- a/game/src/Game/Theme/StyleBoxCombinedTexture.gd +++ b/game/src/Game/Theme/StyleBoxCombinedTexture.gd @@ -7,13 +7,13 @@ var texture_settings : Array[TextureSetting] = []: get: return texture_settings.duplicate() set(v): texture_settings = v - for setting in texture_settings: + for setting : TextureSetting in texture_settings: setting.changed.connect(emit_changed) emit_changed() func _get_draw_rect(rect : Rect2) -> Rect2: var combined_rect : Rect2 = Rect2() - for setting in texture_settings: + for setting : TextureSetting in texture_settings: if combined_rect.position.x > setting.expand_margin_left: combined_rect.position.x = setting.expand_margin_left if combined_rect.position.y > setting.expand_margin_top: @@ -25,7 +25,7 @@ func _get_draw_rect(rect : Rect2) -> Rect2: return rect.grow_individual(combined_rect.position.x, combined_rect.position.y, combined_rect.end.x, combined_rect.end.y) func _draw(to_canvas_item : RID, rect : Rect2) -> void: - for setting in texture_settings: + for setting : TextureSetting in texture_settings: if setting == null or setting.texture == null: continue var inner_rect : Rect2 = rect -- cgit v1.2.3-56-ga3b1