mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Only grab guide focus when they're visible
This commit is contained in:
parent
e9775551fe
commit
f5cf3f3ca7
|
@ -27,7 +27,7 @@ func _input(_event : InputEvent):
|
||||||
else:
|
else:
|
||||||
point0.x -= width * 3
|
point0.x -= width * 3
|
||||||
point1.x += width * 3
|
point1.x += width * 3
|
||||||
if Global.can_draw and Global.has_focus and point_in_rectangle(mouse_pos, point0, point1) and Input.is_action_just_pressed("left_mouse"):
|
if Global.can_draw and Global.has_focus and point_in_rectangle(mouse_pos, point0, point1) and Input.is_action_just_pressed("left_mouse") and visible:
|
||||||
if !point_in_rectangle(Global.canvas.current_pixel, Global.canvas.location, Global.canvas.location + project.size):
|
if !point_in_rectangle(Global.canvas.current_pixel, Global.canvas.location, Global.canvas.location + project.size):
|
||||||
has_focus = true
|
has_focus = true
|
||||||
Global.has_focus = false
|
Global.has_focus = false
|
||||||
|
|
Loading…
Reference in a new issue