This skill helps an agent lay out responsive Godot 4.7 UI. It reads the stretch settings first, anchors top-level panels, lets Containers place their children, styles everything with one Theme and wires focus so a gamepad can reach every button.
It includes a headless layout test that instantiates a menu in viewports of several sizes and flags controls pushed off-screen or menus with nothing focused. A gotcha list covers invisible panels that swallow clicks, container children that ignore their own position and Godot 3 property names.
What You Get
- A core workflow from reading display stretch settings to anchors, containers, theming, focus and signals
- Patterns for a Full Rect panel from code, a button menu with initial focus and a child that takes leftover space
- A headless layout test that checks controls stay on screen and a focus owner exists at several viewport sizes
- A gotcha list for container overrides, anchors versus offsets, unreachable gamepad buttons and mouse filters
Common Use Cases
- Building a main menu or pause screen that works with keyboard and gamepad
- Fixing UI that overlaps or drifts when the window is resized
- Finding the invisible panel that swallows clicks
- Setting a project-wide Theme
What Makes It Unique
The skill tests layout in code: it instantiates the scene in SubViewports at the sizes the UI really receives under the project’s stretch mode and reports controls outside the screen. It also covers 4.7 additions such as offset transforms for nudging container children.
Under The Hood
The agent loads the SKILL.md and, when needed, a reference on anchor maths, container types and theming. It reads project.godot and scene files, writes a GDScript layout test into your project and runs the Godot binary headless to read the exit code. For a visual check it suggests running the Godot binary with movie writing on a machine with a GPU, which writes numbered image files. It may also run the Python project checker from a sibling skill. It fetches no web pages and calls no APIs; without a Godot binary it asks you to run the commands and send the output or screenshots.