Skip to content

Commit 60abb34

Browse files
committed
fixup! Entry restyle and hexagonal booleans
POINT_WIDTH -> POINTY_WIDTH
1 parent 357df54 commit 60abb34

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ func _draw():
129129
# Right side
130130
if background_variant == POINTED:
131131
# Top
132-
fill_polygon.append(Vector2(size.x - Constants.POINT_WIDTH, 0.0))
132+
fill_polygon.append(Vector2(size.x - Constants.POINTY_WIDTH, 0.0))
133133

134134
# Middle
135135
fill_polygon.append(Vector2(size.x, size.y / 2.0))
136136

137137
# Bottom
138-
fill_polygon.append(Vector2(size.x - Constants.POINT_WIDTH, size.y))
138+
fill_polygon.append(Vector2(size.x - Constants.POINTY_WIDTH, size.y))
139139
else:
140140
fill_polygon.append(Vector2(size.x, 0.0))
141141
fill_polygon.append(Vector2(size.x, size.y))
@@ -149,13 +149,13 @@ func _draw():
149149
# Left side
150150
if background_variant == POINTED:
151151
# Bottom
152-
fill_polygon.append(Vector2(Constants.POINT_WIDTH, size.y))
152+
fill_polygon.append(Vector2(Constants.POINTY_WIDTH, size.y))
153153

154154
# Middle
155155
fill_polygon.append(Vector2(0.0, size.y / 2.0))
156156

157157
# Top
158-
fill_polygon.append(Vector2(Constants.POINT_WIDTH, 0.0))
158+
fill_polygon.append(Vector2(Constants.POINTY_WIDTH, 0.0))
159159
else:
160160
fill_polygon.append(Vector2(0.0, size.y))
161161
fill_polygon.append(Vector2(0.0, 0.0))
@@ -169,7 +169,7 @@ func _draw():
169169

170170
# Top line
171171
if background_variant == POINTED:
172-
stroke_polygon.append(Vector2(shift_top - (0.0 if not shift_top > 0 else outline_middle) + Constants.POINT_WIDTH, 0.0))
172+
stroke_polygon.append(Vector2(shift_top - (0.0 if not shift_top > 0 else outline_middle) + Constants.POINTY_WIDTH, 0.0))
173173
else:
174174
stroke_polygon.append(Vector2(shift_top - (0.0 if not shift_top > 0 else outline_middle), 0.0))
175175

@@ -179,13 +179,13 @@ func _draw():
179179
# Right line
180180
if background_variant == POINTED:
181181
# Top
182-
stroke_polygon.append(Vector2(size.x - Constants.POINT_WIDTH, 0.0))
182+
stroke_polygon.append(Vector2(size.x - Constants.POINTY_WIDTH, 0.0))
183183

184184
# Middle
185185
stroke_polygon.append(Vector2(size.x, size.y / 2.0))
186186

187187
# Bottom
188-
stroke_polygon.append(Vector2(size.x - Constants.POINT_WIDTH, size.y))
188+
stroke_polygon.append(Vector2(size.x - Constants.POINTY_WIDTH, size.y))
189189
else:
190190
stroke_polygon.append(Vector2(size.x, 0.0))
191191
stroke_polygon.append(Vector2(size.x, size.y))
@@ -198,18 +198,18 @@ func _draw():
198198

199199
# Left line
200200
if background_variant == POINTED:
201-
stroke_polygon.append(Vector2(shift_bottom - (outline_middle if shift_bottom > 0 else 0.0) + Constants.POINT_WIDTH, size.y))
202-
edge_polygon.append(Vector2(Constants.POINT_WIDTH + outline_middle, 0.0))
201+
stroke_polygon.append(Vector2(shift_bottom - (outline_middle if shift_bottom > 0 else 0.0) + Constants.POINTY_WIDTH, size.y))
202+
edge_polygon.append(Vector2(Constants.POINTY_WIDTH + outline_middle, 0.0))
203203

204204
# Top
205-
edge_polygon.append(Vector2(Constants.POINT_WIDTH, 0.0))
205+
edge_polygon.append(Vector2(Constants.POINTY_WIDTH, 0.0))
206206

207207
# Middle
208208
edge_polygon.append(Vector2(0.0, size.y / 2.0))
209209

210210
# Bottom
211-
edge_polygon.append(Vector2(Constants.POINT_WIDTH, size.y))
212-
edge_polygon.append(Vector2(Constants.POINT_WIDTH + outline_middle, size.y))
211+
edge_polygon.append(Vector2(Constants.POINTY_WIDTH, size.y))
212+
edge_polygon.append(Vector2(Constants.POINTY_WIDTH + outline_middle, size.y))
213213
else:
214214
stroke_polygon.append(Vector2(shift_bottom - (outline_middle if shift_bottom > 0 else 0.0), size.y))
215215
edge_polygon.append(Vector2(0.0, 0.0 - (0.0 if shift_top > 0 else outline_middle)))

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ func _ready():
3434

3535
func _draw():
3636
var fill_polygon: PackedVector2Array
37-
fill_polygon.append(Vector2(Constants.POINT_WIDTH if background_variant else 0.0, 0.0))
38-
fill_polygon.append(Vector2(size.x + (Constants.POINT_WIDTH if background_variant else 0.0), 0.0))
39-
fill_polygon.append(Vector2(size.x + (Constants.POINT_WIDTH if background_variant else 0.0), size.y))
40-
fill_polygon.append(Vector2(Constants.POINT_WIDTH if background_variant else 0.0, size.y))
41-
fill_polygon.append(Vector2(Constants.POINT_WIDTH if background_variant else 0.0, 0.0))
37+
fill_polygon.append(Vector2(Constants.POINTY_WIDTH if background_variant else 0.0, 0.0))
38+
fill_polygon.append(Vector2(size.x + (Constants.POINTY_WIDTH if background_variant else 0.0), 0.0))
39+
fill_polygon.append(Vector2(size.x + (Constants.POINTY_WIDTH if background_variant else 0.0), size.y))
40+
fill_polygon.append(Vector2(Constants.POINTY_WIDTH if background_variant else 0.0, size.y))
41+
fill_polygon.append(Vector2(Constants.POINTY_WIDTH if background_variant else 0.0, 0.0))
4242

4343
var left_polygon: PackedVector2Array
4444
var right_polygon: PackedVector2Array
4545

46-
left_polygon.append(Vector2(Constants.POINT_WIDTH if background_variant else 0.0, 0.0))
47-
left_polygon.append(Vector2(Constants.POINT_WIDTH if background_variant else 0.0, size.y))
46+
left_polygon.append(Vector2(Constants.POINTY_WIDTH if background_variant else 0.0, 0.0))
47+
left_polygon.append(Vector2(Constants.POINTY_WIDTH if background_variant else 0.0, size.y))
4848

49-
right_polygon.append(Vector2(size.x + (Constants.POINT_WIDTH if background_variant else 0.0), 0.0))
50-
right_polygon.append(Vector2(size.x + (Constants.POINT_WIDTH if background_variant else 0.0), size.y))
49+
right_polygon.append(Vector2(size.x + (Constants.POINTY_WIDTH if background_variant else 0.0), 0.0))
50+
right_polygon.append(Vector2(size.x + (Constants.POINTY_WIDTH if background_variant else 0.0), size.y))
5151

5252
draw_colored_polygon(fill_polygon, color)
5353
draw_polyline(left_polygon, Constants.FOCUS_BORDER_COLOR if parent_block.has_focus() else outline_color, Constants.OUTLINE_WIDTH)

addons/block_code/ui/constants.gd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const KNOB_X = 10.0
66
const KNOB_W = 20.0
77
const KNOB_H = 5.0
88
const KNOB_Z = 5.0
9-
const POINT_WIDTH = 5.0
9+
const POINTY_WIDTH = 15.0
1010
const CONTROL_MARGIN = 20.0
1111
const OUTLINE_WIDTH = 3.0
1212
const MINIMUM_SNAP_DISTANCE = 80.0

0 commit comments

Comments
 (0)