mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 21:04:43 -04:00
Turn Symmetry Guides visibility on and off if mirroring is enabled
Also fixed issue with "Show Guides" view menu option and having multiple projects with guides. Only think remaining is to make the Symmetry Guides look different than regular guides. Closes #133.
This commit is contained in:
parent
9fa91ffd8e
commit
a5a8bf1fe5
6 changed files with 26 additions and 2 deletions
|
@ -27,11 +27,21 @@ func _on_PixelPerfect_toggled(button_pressed : bool):
|
|||
func _on_Horizontal_toggled(button_pressed : bool):
|
||||
tool_slot.horizontal_mirror = button_pressed
|
||||
tool_slot.save_config()
|
||||
Global.show_y_symmetry_axis = button_pressed
|
||||
# If the button is not pressed but another button is, keep the symmetry guide visible
|
||||
if !button_pressed and (Tools._slots[BUTTON_LEFT].horizontal_mirror or Tools._slots[BUTTON_RIGHT].horizontal_mirror):
|
||||
Global.show_y_symmetry_axis = true
|
||||
Global.current_project.y_symmetry_axis.visible = Global.show_y_symmetry_axis and Global.show_guides
|
||||
|
||||
|
||||
func _on_Vertical_toggled(button_pressed : bool):
|
||||
tool_slot.vertical_mirror = button_pressed
|
||||
tool_slot.save_config()
|
||||
Global.show_x_symmetry_axis = button_pressed
|
||||
# If the button is not pressed but another button is, keep the symmetry guide visible
|
||||
if !button_pressed and (Tools._slots[BUTTON_LEFT].vertical_mirror or Tools._slots[BUTTON_RIGHT].vertical_mirror):
|
||||
Global.show_x_symmetry_axis = true
|
||||
Global.current_project.x_symmetry_axis.visible = Global.show_x_symmetry_axis and Global.show_guides
|
||||
|
||||
|
||||
func save_config() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue