1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

Turn zen mode off when switching between layouts

This commit is contained in:
Manolis Papadeas 2022-02-02 02:51:43 +02:00
parent 4369869e1f
commit 13229031ed
2 changed files with 17 additions and 0 deletions

View file

@ -5,21 +5,25 @@
[ext_resource path="res://addons/dockable_container/layout.gd" type="Script" id=3]
[sub_resource type="Resource" id=1]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Tools" )
current_tab = 0
[sub_resource type="Resource" id=8]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Main Canvas" )
current_tab = 0
[sub_resource type="Resource" id=9]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Animation Timeline" )
current_tab = 0
[sub_resource type="Resource" id=10]
resource_name = "Split"
script = ExtResource( 2 )
direction = 1
percent = 0.882812
@ -27,16 +31,19 @@ first = SubResource( 8 )
second = SubResource( 9 )
[sub_resource type="Resource" id=11]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Canvas Preview" )
current_tab = 0
[sub_resource type="Resource" id=23]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Color Pickers" )
current_tab = 0
[sub_resource type="Resource" id=24]
resource_name = "Split"
script = ExtResource( 2 )
direction = 1
percent = 0.0
@ -64,6 +71,7 @@ first = SubResource( 25 )
second = SubResource( 26 )
[sub_resource type="Resource" id=21]
resource_name = "Split"
script = ExtResource( 2 )
direction = 1
percent = 0.182692
@ -71,11 +79,13 @@ first = SubResource( 24 )
second = SubResource( 27 )
[sub_resource type="Resource" id=13]
resource_name = "Tabs"
script = ExtResource( 1 )
names = PoolStringArray( "Palette Panel" )
current_tab = 0
[sub_resource type="Resource" id=15]
resource_name = "Split"
script = ExtResource( 2 )
direction = 1
percent = 1.0
@ -83,6 +93,7 @@ first = SubResource( 21 )
second = SubResource( 13 )
[sub_resource type="Resource" id=16]
resource_name = "Split"
script = ExtResource( 2 )
direction = 0
percent = 0.972488
@ -90,6 +101,7 @@ first = SubResource( 10 )
second = SubResource( 15 )
[sub_resource type="Resource" id=5]
resource_name = "Split"
script = ExtResource( 2 )
direction = 0
percent = 0.00695249

View file

@ -435,6 +435,7 @@ func _dockers_submenu_id_pressed(id: int) -> void:
func _layouts_submenu_id_pressed(id: int) -> void:
# Clone is needed so that the premade layouts do not get modified
Global.control.ui.layout = layouts[id][1].clone()
for i in layouts.size():
layouts_submenu.set_item_checked(i, i == id)
@ -442,6 +443,10 @@ func _layouts_submenu_id_pressed(id: int) -> void:
for i in ui_elements.size():
dockers_submenu.set_item_checked(i, true)
Global.control.find_node("TabsContainer").visible = true
zen_mode = false
view_menu.set_item_checked(ViewMenuId.ZEN_MODE, false)
func _toggle_mirror_view() -> void:
Global.mirror_view = !Global.mirror_view