Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jowan-Spooner committed Jun 14, 2024
1 parent 09a5d95 commit a97bb5e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addons/dialogic/Modules/Character/node_portrait_container.gd
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ func update_portrait_transforms() -> void:
return

match pivot_mode:
pivot_offset = _get_origin_position()
PivotModes.AT_ORIGIN:
pivot_offset = size*pivot_value
pivot_offset = _get_origin_position()
PivotModes.PERCENTAGE:
pivot_offset = size*pivot_value
PivotModes.PIXELS:
pivot_offset = pivot_value

Expand Down
9 changes: 6 additions & 3 deletions addons/dialogic/Modules/Character/subsystem_containers.gd
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ func translate_container(container:DialogicNode_PortraitContainer, translation:V

if tween:
tween.tween_method(DialogicUtil.multitween.bind(container, "position", "base"), container.position, final_translation, time)
tween.finished.connect(save_position_container.bind(container))
if not tween.finished.is_connected(save_position_container):
tween.finished.connect(save_position_container.bind(container))
else:
container.position = final_translation
save_position_container(container)
Expand All @@ -166,7 +167,8 @@ func rotate_container(container:DialogicNode_PortraitContainer, rotation:float,

if tween:
tween.tween_property(container, 'rotation_degrees', final_rotation, time)
tween.finished.connect(save_position_container.bind(container))
if not tween.finished.is_connected(save_position_container):
tween.finished.connect(save_position_container.bind(container))
else:
container.rotation_degrees = final_rotation
save_position_container(container)
Expand All @@ -192,7 +194,8 @@ func resize_container(container: DialogicNode_PortraitContainer, rect_size: Vari
if tween:
tween.tween_method(DialogicUtil.multitween.bind(container, "position", "resize_move"), Vector2(), relative_position_change, time)
tween.tween_property(container, 'size', final_rect_resize, time)
tween.finished.connect(save_position_container.bind(container))
if not tween.finished.is_connected(save_position_container):
tween.finished.connect(save_position_container.bind(container))
else:
container.position = container.position + relative_position_change
container.size = final_rect_resize
Expand Down

0 comments on commit a97bb5e

Please sign in to comment.