1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-02-20 12:33:14 +00:00

Change into forbidden cursor in the canvas if the layer is unavailable

Unavailable means either locked or invisible, or both.
This commit is contained in:
Manolis Papadeas 2022-08-31 00:36:41 +03:00
parent 488cf0cc93
commit eef722946c

View file

@ -96,6 +96,10 @@ func _input(event: InputEvent) -> void:
var cursor := Control.CURSOR_ARROW
if Global.cross_cursor:
cursor = Control.CURSOR_CROSS
var project: Project = Global.current_project
var layer: Layer = project.layers[project.current_layer]
if not layer.can_layer_get_drawn():
cursor = Control.CURSOR_FORBIDDEN
if Global.main_viewport.mouse_default_cursor_shape != cursor:
Global.main_viewport.mouse_default_cursor_shape = cursor