Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

gilzoide
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant