mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:34: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
|
@ -4,6 +4,7 @@ class_name SymmetryGuide extends Guide
|
|||
func _ready() -> void:
|
||||
._ready()
|
||||
has_focus = false
|
||||
visible = false
|
||||
|
||||
|
||||
func _input(_event : InputEvent) -> void:
|
||||
|
|
|
@ -260,8 +260,13 @@ func toggle_show_guides() -> void:
|
|||
Global.show_guides = !Global.show_guides
|
||||
view_menu.set_item_checked(3, Global.show_guides)
|
||||
for guide in Global.canvas.get_children():
|
||||
if guide is Guide:
|
||||
if guide is Guide and guide in Global.current_project.guides:
|
||||
guide.visible = Global.show_guides
|
||||
if guide is SymmetryGuide:
|
||||
if guide.type == Guide.Types.HORIZONTAL:
|
||||
guide.visible = Global.show_x_symmetry_axis and Global.show_guides
|
||||
else:
|
||||
guide.visible = Global.show_y_symmetry_axis and Global.show_guides
|
||||
|
||||
|
||||
func toggle_show_anim_timeline() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue