mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-15 10:13:07 +00:00
Fix bug where the mouse cursor does not reset to default when hovering over a selection gizmo, and the selection gets cleared
This commit is contained in:
parent
7b96947066
commit
ead7593e7e
1 changed files with 15 additions and 8 deletions
|
@ -22,6 +22,8 @@ var big_bounding_rectangle := Rect2i():
|
||||||
big_bounding_rectangle = value
|
big_bounding_rectangle = value
|
||||||
if value.size == Vector2i(0, 0):
|
if value.size == Vector2i(0, 0):
|
||||||
set_process_input(false)
|
set_process_input(false)
|
||||||
|
_set_default_cursor()
|
||||||
|
dragged_gizmo = null
|
||||||
Global.can_draw = true
|
Global.can_draw = true
|
||||||
else:
|
else:
|
||||||
set_process_input(true)
|
set_process_input(true)
|
||||||
|
@ -187,6 +189,11 @@ func _input(event: InputEvent) -> void:
|
||||||
if gizmo_hover:
|
if gizmo_hover:
|
||||||
Input.set_default_cursor_shape(gizmo_hover.get_cursor())
|
Input.set_default_cursor_shape(gizmo_hover.get_cursor())
|
||||||
else:
|
else:
|
||||||
|
_set_default_cursor()
|
||||||
|
|
||||||
|
|
||||||
|
func _set_default_cursor() -> void:
|
||||||
|
var project := Global.current_project
|
||||||
var cursor := Input.CURSOR_ARROW
|
var cursor := Input.CURSOR_ARROW
|
||||||
if Global.cross_cursor:
|
if Global.cross_cursor:
|
||||||
cursor = Input.CURSOR_CROSS
|
cursor = Input.CURSOR_CROSS
|
||||||
|
|
Loading…
Add table
Reference in a new issue