godot-dockable-container icon indicating copy to clipboard operation
godot-dockable-container copied to clipboard

Refactor layout node classes to be RefCounted instead of sub-resources

Open gilzoide opened this issue 2 years ago • 0 comments

This PR refactors layout node classes (DockableLayoutNode, DockableLayoutPanel and DockableLayoutSplit) to inherit from RefCounted instead of Resource. This makes all layout data concentrated in a single resource, avoiding sub-resources. Also, it doesn't make much sense for node classes to be standalone resources, they must live in a layout to be useful. For serialization to work, there is a new serialized_data property that serializes this tree to/from a Dictionary.

Note: this is a breaking change, previously serialized DockableLayout resources will be reset, since the new data is not compatible with previous one.

gilzoide avatar Nov 12 '23 16:11 gilzoide