Skip to content
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

Very small fixes for choices and block movement #1787

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func _draw() -> void:
if end_node.resource is DialogicEndBranchEvent and event.resource.can_contain_events:
rect_size = Vector2(line_width, end_node.global_position.y+end_node.size.y/2-rect_position.y)
else:
rect_size = Vector2(line_width, $Timeline.get_child(-1).global_position.y+$Timeline.get_child(-4).size.y-rect_position.y)
rect_size = Vector2(line_width, $Timeline.get_child(-1).global_position.y+$Timeline.get_child(-1).size.y-rect_position.y)

draw_rect(Rect2(rect_position-global_position, rect_size), color)
draw_rect(Rect2(Vector2(event.get_node('%IconPanel').global_position.x+line_width, rect_position.y+rect_size.y-line_width)-global_position, Vector2(horizontal_line_length, line_width)), color)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ func _on_timeline_area_drag_completed(type:int, index:int, data:Variant) -> void
TimelineUndoRedo.commit_action()

elif type == %TimelineArea.DragTypes.EXISTING_EVENTS:
move_blocks_to_index(data, index)
if not (len(data) == 1 and data[0].get_index()+1 == index):
move_blocks_to_index(data, index)

await get_tree().process_frame
something_changed()
Expand Down