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
Panel
that encloses all of theResponsiveSection
nodes. This is required since the parent of aResponsiveSection
node must be a descendant ofControl
, in order to respond to theresized
signal. - Each
ResponsiveSection
node has one or moreResponsiveSizing
nodes as direct descendants (again required in order for theResponsiveSection
node to dynamically iterate all children for the correct responsive layout to apply) that have theMinimum Parent Size
property set accordingly (along with the layout information). - Besides the
ResponsiveSizing
nodes, eachResponsiveSection
node 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). **