Skip to content

Commit

Permalink
Update scene layout
Browse files Browse the repository at this point in the history
  • Loading branch information
gilzoide committed Nov 12, 2023
1 parent 6c36706 commit b82ed45
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
2 changes: 1 addition & 1 deletion addons/dockable_container/layout.gd
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func _ensure_names_in_node(


func _remove_leaf(leaf: DockableLayoutPanel) -> void:
assert(leaf.is_empty(), "FIXME: trying to remove_at a leaf with nodes")
assert(leaf.is_empty(), "FIXME: trying to remove a leaf with nodes")
if _root == leaf:
return
var collapsed_branch := leaf.parent
Expand Down
31 changes: 26 additions & 5 deletions addons/dockable_container/samples/TestScene.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,24 @@ script = ExtResource("2")
serialized_data = {
"hidden_tabs": {},
"root": {
"direction": 0,
"first": {
"direction": 1,
"first": {
"current_tab": 1,
"names": PackedStringArray("Control0")
},
"percent": 0.5,
"second": {
"current_tab": 0,
"names": PackedStringArray("Control0", "Control1", "Control2")
"names": PackedStringArray("Control1")
}
},
"percent": 0.565485,
"second": {
"current_tab": 0,
"names": PackedStringArray("Control2")
}
}
}

Expand All @@ -21,8 +37,16 @@ script = ExtResource("2")
serialized_data = {
"hidden_tabs": {},
"root": {
"direction": 1,
"first": {
"current_tab": 0,
"names": PackedStringArray("Control3")
},
"percent": 0.5,
"second": {
"current_tab": 0,
"names": PackedStringArray("Control3", "Control4", "Control5")
"names": PackedStringArray("Control4", "Control5")
}
}
}

Expand Down Expand Up @@ -95,13 +119,11 @@ custom_minimum_size = Vector2(100, 100)
layout_mode = 2

[node name="Control1" type="ColorRect" parent="DockableContainers/DockableContainer"]
visible = false
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
color = Color(0.141176, 0.0745098, 0.603922, 1)

[node name="Control2" type="ColorRect" parent="DockableContainers/DockableContainer"]
visible = false
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
color = Color(0.533333, 0.380392, 0.380392, 1)
Expand All @@ -124,7 +146,6 @@ layout_mode = 2
color = Color(0, 1, 0.905882, 1)

[node name="Control4" type="ColorRect" parent="DockableContainers/DockableContainer2"]
visible = false
custom_minimum_size = Vector2(100, 100)
layout_mode = 2
color = Color(0, 0.698039, 0.0588235, 1)
Expand Down

0 comments on commit b82ed45

Please sign in to comment.