Skip to content

Commit 4ceae48

Browse files
committed
fixup! Entry restyle and hexagonal booleans
top_variant -> is_round_top
1 parent 009e17b commit 4ceae48

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

addons/block_code/ui/blocks/entry_block/entry_block.tscn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ layout_mode = 2
4141
mouse_filter = 1
4242
script = ExtResource("2_yrw8l")
4343
color = Color(1, 1, 1, 1)
44-
top_variant = 1
44+
is_round_top = true
4545

4646
[node name="DragDropArea" parent="VBoxContainer/TopMarginContainer" instance=ExtResource("3_swkpp")]
4747
layout_mode = 2

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

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@ var parent_block: Block
2727
@export var shift_bottom: float = 0.0:
2828
set = _set_shift_bottom
2929

30-
enum { BODY, HEADER }
31-
32-
## Style of the top knob
33-
@export var top_variant := BODY:
34-
set = _set_top_variant
30+
@export var is_round_top: bool = false:
31+
set = _set_is_round_top
3532

3633
@export var is_pointy: bool = false:
3734
set = _set_is_pointy
@@ -68,8 +65,8 @@ func _set_shift_bottom(new_shift_bottom):
6865
queue_redraw()
6966

7067

71-
func _set_top_variant(new_variant):
72-
top_variant = clamp(new_variant, BODY, HEADER)
68+
func _set_is_round_top(new_is_round_top):
69+
is_round_top = new_is_round_top
7370
queue_redraw()
7471

7572

@@ -95,7 +92,7 @@ func _draw():
9592
fill_polygon.append(Vector2(0.0, 0.0))
9693

9794
if show_top:
98-
if top_variant == HEADER:
95+
if is_round_top:
9996
top_knob.append_array(
10097
[
10198
Vector2(5, -4.012612),

0 commit comments

Comments
 (0)