This project is a plugin implementation for Godot Engine. The plugin consists
of two custom nodes, ResponsiveSection and ResponsiveSizing, that together allow a GUI to dynamically
adapt to differing resolutions.
- Automatic detection of parent node resizing;
- Anchor and margin dynamic updates;
- Dynamic size flags and scale updates;
- Automatic visibility change for different resolutions;
If you want to see an example in action check out the example scene. The example is set up as follows:
- There is a root
Panelthat encloses all of theResponsiveSectionnodes. This is required since the parent of aResponsiveSectionnode must be a descendant ofControl, in order to respond to theresizedsignal. - Each
ResponsiveSectionnode has one or moreResponsiveSizingnodes as direct descendants (again required in order for theResponsiveSectionnode to dynamically iterate all children for the correct responsive layout to apply) that have theMinimum Parent Sizeproperty set accordingly (along with the layout information). - Besides the
ResponsiveSizingnodes, eachResponsiveSectionnode then has the actual GUI components to display.
**I acknowledge the example provided is not the best, but it was something I just slapped together in order to showcase the responsive capabilities. If you have a better example or if you have a bug fix / new feature that you want to contribute just fork the repo and then issue a pull request (if you can't for any reason just contact me directly or create an issue). **