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/Theme/StyleBoxCombinedTexture.gd | |
parent | 9ee1940ac3d15aa4c0a87b84d1c4ab8958184f63 (diff) |
Add types to GDScript for-loop variablesfor-loop-types
Diffstat (limited to 'game/src/Game/Theme/StyleBoxCombinedTexture.gd')
-rw-r--r-- | game/src/Game/Theme/StyleBoxCombinedTexture.gd | 6 |
1 files changed, 3 insertions, 3 deletions
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 |