mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 12:04:43 -04:00
Fixed bug where the user could drag the guides when the canvas had no focus
This commit is contained in:
parent
10280f25f9
commit
4e33775c84
4 changed files with 6 additions and 7 deletions
|
@ -25,7 +25,7 @@ func _process(delta : float) -> void:
|
|||
else:
|
||||
point0.x -= width * 3
|
||||
point1.x += width * 3
|
||||
if point_in_rectangle(mouse_pos, point0, point1) && 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"):
|
||||
if !point_in_rectangle(Global.canvas.current_pixel, Global.canvas.location, Global.canvas.location + Global.canvas.size):
|
||||
has_focus = true
|
||||
Global.has_focus = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue