diff options
author | Hop311 <Hop3114@gmail.com> | 2024-03-04 23:51:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 23:51:41 +0100 |
commit | eaae420cd2aca224d15f6276624c2fab882c978a (patch) | |
tree | bacc8f4094eff5514a94b3852e9cec9c28391669 /game/src/Game/Theme | |
parent | 521f7d3d156f42535fb7574fb36f2726e9d13885 (diff) | |
parent | e2077a0d93be8b2dd48f1ee680809420f1f690d7 (diff) |
Merge pull request #211 from OpenVicProject/for-loop-types
Add types to GDScript for-loop variables
Diffstat (limited to 'game/src/Game/Theme')
-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 |