1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 17:19:50 +00:00

Set Selection.gd process input false by default, fix cursor still being set to a cross when entering the canvas if it's disabled in the preferences

This commit is contained in:
Emmanouil Papadeas 2024-02-04 00:12:19 +02:00
parent 6a7e060f73
commit 5dfe1cc271
3 changed files with 5 additions and 8 deletions

View file

@ -416,13 +416,7 @@ var native_cursors := false:
else:
control.set_custom_cursor()
## Found in Preferences. If [code]true[/code], cursor becomes cross shaped when hovering the canvas.
var cross_cursor := true:
set(value):
cross_cursor = value
if cross_cursor:
main_viewport.mouse_default_cursor_shape = Control.CURSOR_CROSS
else:
main_viewport.mouse_default_cursor_shape = Control.CURSOR_ARROW
var cross_cursor := true
# View menu options
## If [code]true[/code], the canvas is in greyscale.

View file

@ -80,6 +80,8 @@ class Gizmo:
func _ready() -> void:
# It's being set to true only when the big_bounding_rectangle has a size larger than 0
set_process_input(false)
Global.camera.zoom_changed.connect(_update_on_zoom)
gizmos.append(Gizmo.new(Gizmo.Type.SCALE, Vector2i(-1, -1))) # Top left
gizmos.append(Gizmo.new(Gizmo.Type.SCALE, Vector2i(0, -1))) # Center top

View file

@ -14,7 +14,8 @@ func _on_ViewportContainer_mouse_entered() -> void:
camera.set_process_input(true)
Global.control.left_cursor.visible = Global.show_left_tool_icon
Global.control.right_cursor.visible = Global.show_right_tool_icon
Input.set_default_cursor_shape(Input.CURSOR_CROSS)
if Global.cross_cursor:
Input.set_default_cursor_shape(Input.CURSOR_CROSS)
func _on_ViewportContainer_mouse_exited() -> void: