[go: nahoru, domu]

Skip to content

Commit

Permalink
Very small fixes for choices and block movement (#1787)
Browse files Browse the repository at this point in the history
* Very small fixes for choices and block movement

* Remove unused method
  • Loading branch information
Jowan-Spooner committed Oct 7, 2023
1 parent d29cf9e commit 6d00dde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
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

0 comments on commit 6d00dde

Please sign in to comment.