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:
parent
488cf0cc93
commit
eef722946c
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue