mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Don't call update()
in the canvas on non-mouse input events
This partially addresses #85.
This commit is contained in:
parent
e06586edce
commit
02c76cfd14
|
@ -80,8 +80,12 @@ func camera_zoom() -> void:
|
|||
Global.camera2.offset = size / 2
|
||||
Global.camera_preview.offset = size / 2
|
||||
|
||||
# warning-ignore:unused_argument
|
||||
func _input(event) -> void:
|
||||
func _input(event : InputEvent) -> void:
|
||||
# Don't process anything below if the input isn't a mouse event.
|
||||
# This decreases CPU/GPU usage slightly.
|
||||
if not event is InputEventMouse:
|
||||
return
|
||||
|
||||
sprite_changed_this_frame = false
|
||||
if Global.current_frame == frame:
|
||||
update()
|
||||
|
|
Loading…
Reference in a new issue