mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 15:34:43 -04:00
Added space for panning - Closes #110
This commit is contained in:
parent
a4886a2ee7
commit
48e871586c
5 changed files with 20 additions and 6 deletions
|
@ -11,9 +11,9 @@ func _ready() -> void:
|
|||
func _input(event : InputEvent) -> void:
|
||||
var mouse_pos := viewport_container.get_local_mouse_position()
|
||||
var viewport_size := viewport_container.rect_size
|
||||
if event.is_action_pressed("camera_drag"):
|
||||
if event.is_action_pressed("camera_drag") || event.is_action_pressed("space"):
|
||||
drag = true
|
||||
elif event.is_action_released("camera_drag"):
|
||||
elif event.is_action_released("camera_drag") || event.is_action_released("space"):
|
||||
drag = false
|
||||
|
||||
if Global.can_draw && Rect2(Vector2.ZERO, viewport_size).has_point(mouse_pos):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue