mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:14:42 -04:00
Minor guide and rulers performance boost
Got rid of their _process methods, Guides have input instead, and the rulers get updated when the camera zoom or offset change.
This commit is contained in:
parent
06d19c8e48
commit
b21455cfd0
6 changed files with 34 additions and 30 deletions
|
@ -666,12 +666,16 @@ func _on_FitToFrameButton_pressed() -> void:
|
|||
Global.camera.zoom = Vector2(bigger_canvas_axis, bigger_canvas_axis) / smaller_viewport_axis
|
||||
Global.camera.offset = Global.canvas.size / 2
|
||||
Global.zoom_level_label.text = str(round(100 / Global.camera.zoom.x)) + " %"
|
||||
Global.horizontal_ruler.update()
|
||||
Global.vertical_ruler.update()
|
||||
|
||||
|
||||
func _on_100ZoomButton_pressed() -> void:
|
||||
Global.camera.zoom = Vector2.ONE
|
||||
Global.camera.offset = Global.canvas.size / 2
|
||||
Global.zoom_level_label.text = str(round(100 / Global.camera.zoom.x)) + " %"
|
||||
Global.horizontal_ruler.update()
|
||||
Global.vertical_ruler.update()
|
||||
|
||||
|
||||
func _on_LeftHorizontalMirroring_toggled(button_pressed) -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue