77 game-dev skills for AI coding agents — Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox. Portable SKILL.md Agent Skills (the format Anthropic launched as Claude Skills), with a router that loads the right skill for your engine and task. Runs in Claude Code, Cursor, Kiro, Codex, Copilot, Gemini CLI and more.
Python agent-skillsai-agentsantigravityawesome-listclaude-codeclinecodexcursorgame-devgame-developmentgamedevgemini-cligithub-copilotgodotkirooh-my-piskillsunityunrealwindsurf
fix(godot): use set_anchors_and_offsets_preset for full-rect layout, add 4.7 offset transforms and VirtualJoystick
Kiro Crewcaef3b0fadc9
diff --git a/skills/godot/godot-ui-control/SKILL.md b/skills/godot/godot-ui-control/SKILL.mdindex 2623bd3..d3d1bd1 100644--- a/skills/godot/godot-ui-control/SKILL.md+++ b/skills/godot/godot-ui-control/SKILL.md@@ -48,10 +48,12 @@ animating UI transitions → `godot-animation` (Tween); genre UIs like card handextends Controlfunc _ready() -> void:- # Stretch this panel to fill its parent (equivalent to the "Full Rect" preset).- anchors_preset = Control.PRESET_FULL_RECT- # Or set anchors manually: all four edges at the parent's far corners.- # anchor_left = 0; anchor_top = 0; anchor_right = 1; anchor_bottom = 1+ # Stretch this panel to fill its parent (the editor's "Full Rect" preset).+ # Setting only anchors (or `anchors_preset`) keeps the current offsets, so the+ # control keeps its old rect; this call moves anchors AND resets offsets.+ set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)+ # Manual equivalent: anchor_left = 0; anchor_top = 0; anchor_right = 1;+ # anchor_bottom = 1, then set all four offset_* to 0.```### 2. A menu built from containers + button signals@@ -96,14 +98,17 @@ func _ready() -> void:- **Mixing manual position with Containers.** A child of a `Container` cannot set its ownposition/anchors — the container owns layout. To free-place, take the node out of the- container or use a plain `Control`/`PanelContainer` wrapper.+ container or use a plain `Control`/`PanelContainer` wrapper. To nudge, rotate or scale a+ container child (e.g. a hover pop) in 4.7+, set `offset_transform_enabled = true` and use+ `offset_transform_position`/`_rotation`/`_scale`; the container leaves those alone.- **Anchors vs offsets.** Anchors are fractions of the parent; offsets are pixel deltasfrom the anchored point. Set anchors via presets, then nudge with offsets. Setting onlyposition while anchors are at 0 makes UI not scale with the window.- **`Node2D` for UI.** Buttons/labels parented under a `Node2D` won't theme or take focuscorrectly. Keep UI under a `CanvasLayer`/`Control` subtree.- **Focus lost on gamepad.** If nothing is focused, directional input does nothing. Call- `grab_focus()` on an initial control and ensure `focus_mode` is not `FOCUS_NONE`.+ `grab_focus()` on an initial control and ensure `focus_mode` is `FOCUS_ALL` (`FOCUS_CLICK`+ is mouse-only, `FOCUS_NONE` never focuses).- **Theme vs theme override.** A `Theme` resource styles a whole subtree; `add_theme_*`overrides one node. Overusing per-node overrides defeats centralized theming.- **`rect_*` properties are renamed.** Godot 3's `rect_size`/`rect_position`/`rect_min_size`diff --git a/skills/godot/godot-ui-control/references/layout-and-theming.md b/skills/godot/godot-ui-control/references/layout-and-theming.mdindex 972e05d..87b1b92 100644--- a/skills/godot/godot-ui-control/references/layout-and-theming.md+++ b/skills/godot/godot-ui-control/references/layout-and-theming.md@@ -14,8 +14,10 @@ anchored point.the parent. Offsets become margins.- Center presets set anchors to `0.5` and use offsets relative to the center.-Use `anchors_preset = Control.PRESET_*` (CENTER, FULL_RECT, TOP_WIDE, BOTTOM_RIGHT, ...)-or the editor's Layout toolbar; it sets anchors and offsets together.+Use the editor's Layout toolbar, or in code+`set_anchors_and_offsets_preset(Control.PRESET_*)` (CENTER, FULL_RECT, TOP_WIDE,+BOTTOM_RIGHT, ...), which sets anchors and offsets together. Assigning `anchor_*` or+`anchors_preset` alone keeps the existing offsets, so the rect does not snap to the preset.## Container types@@ -79,7 +81,8 @@ texture), and `StyleBoxEmpty` cover most needs.## Focus navigation (keyboard / gamepad)```gdscript-control.focus_mode = Control.FOCUS_ALL # FOCUS_NONE | FOCUS_CLICK | FOCUS_ALL+control.focus_mode = Control.FOCUS_ALL # also FOCUS_NONE, FOCUS_CLICK (mouse only),+ # FOCUS_ACCESSIBILITY (screen readers only)control.grab_focus()# Explicit neighbors (NodePaths) override automatic geometry-based neighbor finding:control.focus_neighbor_bottom = next_button.get_path()@@ -90,6 +93,20 @@ The default UI input actions (`ui_up/down/left/right/accept/cancel/focus_next`)focus movement; they map to arrow keys, Enter, and the gamepad D-pad/face buttons out ofthe box.+## Offset transforms (4.7+)++Containers overwrite their children's `position`, `rotation` and `scale` on every re-sort.+For animation inside a container, enable `offset_transform_enabled` and tween+`offset_transform_position` / `_rotation` / `_scale` (pivot: `offset_transform_pivot_ratio`,+centre by default). With `offset_transform_visual_only = true` (default) input still hits+the untransformed rect.++## Touch joystick (4.7+)++`VirtualJoystick` is a built-in `Control` for touchscreens. Set `joystick_mode`+(`JOYSTICK_FIXED`, `JOYSTICK_DYNAMIC`, `JOYSTICK_FOLLOWING`) and the `action_left/right/up/down`+input actions it presses, then read movement with `Input.get_vector()` as for a gamepad.+## HUDs over the gamePut HUD UI under a `CanvasLayer` so it renders on top of and independent from the moving