Skip to content

Commit

Permalink
fixup! Entry restyle and hexagonal booleans
Browse files Browse the repository at this point in the history
top_variant -> is_round_top
  • Loading branch information
manuq committed Nov 22, 2024
1 parent e4adc28 commit 8c4b024
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion addons/block_code/ui/blocks/entry_block/entry_block.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 5 additions & 8 deletions addons/block_code/ui/blocks/utilities/background/background.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()


Expand All @@ -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),
Expand Down

0 comments on commit 8c4b024

Please sign in to comment.