diff --git a/addons/block_code/ui/blocks/entry_block/entry_block.tscn b/addons/block_code/ui/blocks/entry_block/entry_block.tscn index 3c0ed713..27404035 100644 --- a/addons/block_code/ui/blocks/entry_block/entry_block.tscn +++ b/addons/block_code/ui/blocks/entry_block/entry_block.tscn @@ -41,7 +41,7 @@ layout_mode = 2 mouse_filter = 1 script = ExtResource("2_yrw8l") color = Color(1, 1, 1, 1) -top_variant = 1 +is_round_top = true [node name="DragDropArea" parent="VBoxContainer/TopMarginContainer" instance=ExtResource("3_swkpp")] layout_mode = 2 diff --git a/addons/block_code/ui/blocks/utilities/background/background.gd b/addons/block_code/ui/blocks/utilities/background/background.gd index da3f5419..c686f2a1 100644 --- a/addons/block_code/ui/blocks/utilities/background/background.gd +++ b/addons/block_code/ui/blocks/utilities/background/background.gd @@ -27,11 +27,8 @@ var parent_block: Block @export var shift_bottom: float = 0.0: set = _set_shift_bottom -enum { BODY, HEADER } - -## Style of the top knob -@export var top_variant := BODY: - set = _set_top_variant +@export var is_round_top: bool = false: + set = _set_is_round_top @export var is_pointy: bool = false: set = _set_is_pointy @@ -68,8 +65,8 @@ func _set_shift_bottom(new_shift_bottom): queue_redraw() -func _set_top_variant(new_variant): - top_variant = clamp(new_variant, BODY, HEADER) +func _set_is_round_top(new_is_round_top): + is_round_top = new_is_round_top queue_redraw() @@ -95,7 +92,7 @@ func _draw(): fill_polygon.append(Vector2(0.0, 0.0)) if show_top: - if top_variant == HEADER: + if is_round_top: top_knob.append_array( [ Vector2(5, -4.012612),