1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Cursor shape no longer changes when a gizmo is being dragged and the mouse cursor goes above another gizmo

This commit is contained in:
Manolis Papadeas 2021-05-08 16:06:02 +03:00
parent 9b54f8a387
commit 6adb01aac1

View file

@ -96,10 +96,11 @@ func _input(event : InputEvent) -> void:
if g.rect.has_point(Global.canvas.current_pixel): if g.rect.has_point(Global.canvas.current_pixel):
gizmo = Gizmo.new(g.type, g.direction) gizmo = Gizmo.new(g.type, g.direction)
break break
if gizmo: if !dragged_gizmo:
Global.main_viewport.mouse_default_cursor_shape = gizmo.get_cursor() if gizmo:
elif !dragged_gizmo: Global.main_viewport.mouse_default_cursor_shape = gizmo.get_cursor()
Global.main_viewport.mouse_default_cursor_shape = Input.CURSOR_CROSS else:
Global.main_viewport.mouse_default_cursor_shape = Input.CURSOR_CROSS
if event is InputEventMouseButton and event.button_index == BUTTON_LEFT: if event is InputEventMouseButton and event.button_index == BUTTON_LEFT:
if event.pressed: if event.pressed: