Skip to content

Commit ae2a0a1

Browse files
committed
background: Placate gdformat
1 parent f642d43 commit ae2a0a1

File tree

1 file changed

+24
-38
lines changed

1 file changed

+24
-38
lines changed

addons/block_code/ui/blocks/utilities/background/background.gd

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -52,48 +52,34 @@ func _draw():
5252
var fill_polygon: PackedVector2Array
5353
fill_polygon.append(Vector2(0.0, 0.0))
5454
if show_top:
55-
fill_polygon.append_array(PackedVector2Array(
56-
[
57-
Vector2(Constants.KNOB_X + shift_top, 0.0),
58-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_top, Constants.KNOB_H),
59-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_top, Constants.KNOB_H),
60-
Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_top, 0.0),
61-
]
62-
))
63-
fill_polygon.append_array(PackedVector2Array(
64-
[
65-
Vector2(size.x, 0.0),
66-
Vector2(size.x, size.y),
67-
Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_bottom, size.y),
68-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_bottom, size.y + Constants.KNOB_H),
69-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_bottom, size.y + Constants.KNOB_H),
70-
Vector2(Constants.KNOB_X + shift_bottom, size.y),
71-
Vector2(0.0, size.y),
72-
Vector2(0.0, 0.0),
73-
]
74-
))
55+
fill_polygon.append(Vector2(Constants.KNOB_X + shift_top, 0.0))
56+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_top, Constants.KNOB_H))
57+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_top, Constants.KNOB_H))
58+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_top, 0.0))
59+
60+
fill_polygon.append(Vector2(size.x, 0.0))
61+
fill_polygon.append(Vector2(size.x, size.y))
62+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_bottom, size.y))
63+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_bottom, size.y + Constants.KNOB_H))
64+
fill_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_bottom, size.y + Constants.KNOB_H))
65+
fill_polygon.append(Vector2(Constants.KNOB_X + shift_bottom, size.y))
66+
fill_polygon.append(Vector2(0.0, size.y))
67+
fill_polygon.append(Vector2(0.0, 0.0))
7568

7669
var stroke_polygon: PackedVector2Array
7770
stroke_polygon.append(Vector2(shift_top, 0.0))
7871
if show_top:
79-
stroke_polygon.append_array(PackedVector2Array(
80-
[
81-
Vector2(Constants.KNOB_X + shift_top, 0.0),
82-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_top, Constants.KNOB_H),
83-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_top, Constants.KNOB_H),
84-
Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_top, 0.0),
85-
]
86-
))
87-
stroke_polygon.append_array(PackedVector2Array(
88-
[
89-
Vector2(size.x, 0.0),
90-
Vector2(size.x, size.y),
91-
Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_bottom, size.y),
92-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_bottom, size.y + Constants.KNOB_H),
93-
Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_bottom, size.y + Constants.KNOB_H),
94-
Vector2(Constants.KNOB_X + shift_bottom, size.y),
95-
]
96-
))
72+
stroke_polygon.append(Vector2(Constants.KNOB_X + shift_top, 0.0))
73+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_top, Constants.KNOB_H))
74+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_top, Constants.KNOB_H))
75+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_top, 0.0))
76+
77+
stroke_polygon.append(Vector2(size.x, 0.0))
78+
stroke_polygon.append(Vector2(size.x, size.y))
79+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z * 2 + Constants.KNOB_W + shift_bottom, size.y))
80+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + Constants.KNOB_W + shift_bottom, size.y + Constants.KNOB_H))
81+
stroke_polygon.append(Vector2(Constants.KNOB_X + Constants.KNOB_Z + shift_bottom, size.y + Constants.KNOB_H))
82+
stroke_polygon.append(Vector2(Constants.KNOB_X + shift_bottom, size.y))
9783

9884
stroke_polygon.append(Vector2(shift_bottom, size.y))
9985
if shift_top + shift_bottom == 0:

0 commit comments

Comments
 (0)