Skip to content

Block: Add setter to manage bottom_snap #157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions addons/block_code/ui/blocks/block/block.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ signal modified
@export var category: String

## The next block in the line of execution (can be null if end)
@export var bottom_snap_path: NodePath
@export var bottom_snap_path: NodePath:
set = _set_bottom_snap_path

## The scope of the block (statement of matching entry block)
@export var scope: String = ""
Expand All @@ -35,8 +36,12 @@ signal modified
var bottom_snap: SnapPoint


func _ready():
func _set_bottom_snap_path(value: NodePath):
bottom_snap_path = value
bottom_snap = get_node_or_null(bottom_snap_path)


func _ready():
mouse_filter = Control.MOUSE_FILTER_IGNORE


Expand Down