[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79NZP0WQSA9Q73PBERJGJWC":3,"skill-same:01M79NZP0WQSA9Q73PBERJGJWC":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79NZP0WQSA9Q73PBERJGJWC","godot-ui-control",null,"Build Godot 4.7 user interfaces with Control nodes: anchors and offsets for responsive layout, Container nodes (VBox\u002FHBox\u002FGrid\u002FMargin) for automatic arrangement, Theme resources for consistent styling, and keyboard\u002Fgamepad focus navigation. Use when laying out a HUD, menu, or UI in a Godot project, working with Control\u002FContainer nodes, anchors, themes, or focus in a .tscn.","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fgodot-ui-control\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: godot-ui-control\ndescription: >\n  Build Godot 4.7 user interfaces with Control nodes: anchors and offsets for\n  responsive layout, Container nodes (VBox\u002FHBox\u002FGrid\u002FMargin) for automatic\n  arrangement, Theme resources for consistent styling, and keyboard\u002Fgamepad focus\n  navigation. Use when laying out a HUD, menu, or UI in a Godot project, working\n  with Control\u002FContainer nodes, anchors, themes, or focus in a .tscn.\n---\n\n# Godot UI \u002F Control nodes (4.x)\n\nLay out responsive UI with `Control` anchors and `Container` nodes, style it with a\n`Theme`, and make it navigable by keyboard and gamepad. Targets **Godot 4.7**.\n\n## When to use\n\n- Use when building HUDs, menus, inventories, dialog boxes, or settings screens with\n  `Control`-derived nodes; arranging UI that adapts to window size; theming; or wiring\n  focus navigation for controller\u002Fkeyboard.\n\n**When *not* to use:** in-world 2D nodes (`Node2D`\u002Fsprites) → `godot-nodes-scenes`;\nanimating UI transitions → `godot-animation` (Tween); genre UIs like card hands →\n`card-game`\u002F`visual-novel`. For full input rebinding → `input-systems`.\n\n## Core workflow\n\n1. **Use `Control` nodes for UI**, not `Node2D`. Controls have a rect (position + size),\n   anchors, and participate in focus\u002Ftheming.\n2. **Anchor for responsiveness.** Anchors are fractions (0–1) of the parent rect that the\n   Control's edges stick to. Use the editor's **Layout** presets (Top-Left, Full Rect,\n   Center, etc.) instead of hand-placing pixels.\n3. **Let Containers position children.** Put children in a `VBoxContainer`,\n   `HBoxContainer`, `GridContainer`, `MarginContainer`, etc. — the container sets their\n   position\u002Fsize; you control flow with `size_flags`. Don't set child anchors inside a\n   container (it overrides them).\n4. **Style with a `Theme`.** Assign a `Theme` resource on a top Control; children inherit\n   it. Override per-node with theme overrides only when necessary.\n5. **Wire focus** so gamepad\u002Fkeyboard can move between buttons; set a default focused\n   control and define neighbors or rely on auto-neighbor.\n6. **Connect signals** (`pressed`, `toggled`, `text_submitted`, `value_changed`).\n\n## Patterns\n\n### 1. Responsive layout with anchors (code form)\n\n```gdscript\nextends Control\n\nfunc _ready() -> void:\n    # Stretch this panel to fill its parent (the editor's \"Full Rect\" preset).\n    # Setting only anchors (or `anchors_preset`) keeps the current offsets, so the\n    # control keeps its old rect; this call moves anchors AND resets offsets.\n    set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)\n    # Manual equivalent: anchor_left = 0; anchor_top = 0; anchor_right = 1;\n    # anchor_bottom = 1, then set all four offset_* to 0.\n```\n\n### 2. A menu built from containers + button signals\n\n```gdscript\nextends VBoxContainer    # children stack vertically, auto-sized\n\nfunc _ready() -> void:\n    for child in get_children():\n        if child is Button:\n            child.pressed.connect(_on_button_pressed.bind(child.name))\n    # Give the first button focus so a gamepad can navigate immediately.\n    if get_child_count() > 0:\n        (get_child(0) as Control).grab_focus()\n\nfunc _on_button_pressed(which: StringName) -> void:\n    match which:\n        \"PlayButton\":  get_tree().change_scene_to_file(\"res:\u002F\u002Fgame.tscn\")\n        \"QuitButton\":  get_tree().quit()\n```\n\n### 3. Size flags: make one child expand to fill leftover space\n\n```gdscript\n# In a HBoxContainer: a label on the left, a spacer that eats remaining width.\nfunc _ready() -> void:\n    $Label.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN\n    $Spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL   # grows to fill\n```\n\n### 4. Theme override for one node (without a full Theme resource)\n\n```gdscript\nfunc _ready() -> void:\n    # Per-node overrides: use add_theme_* (type-specific setters).\n    $Title.add_theme_font_size_override(\"font_size\", 32)\n    $Title.add_theme_color_override(\"font_color\", Color.GOLD)\n    $Panel.add_theme_stylebox_override(\"panel\", preload(\"res:\u002F\u002Fui\u002Fpanel.stylebox.tres\"))\n```\n\n## Pitfalls\n\n- **Mixing manual position with Containers.** A child of a `Container` cannot set its own\n  position\u002Fanchors — the container owns layout. To free-place, take the node out of the\n  container or use a plain `Control`\u002F`PanelContainer` wrapper. To nudge, rotate or scale a\n  container child (e.g. a hover pop) in 4.7+, set `offset_transform_enabled = true` and use\n  `offset_transform_position`\u002F`_rotation`\u002F`_scale`; the container leaves those alone.\n- **Anchors vs offsets.** Anchors are fractions of the parent; offsets are pixel deltas\n  from the anchored point. Set anchors via presets, then nudge with offsets. Setting only\n  position while anchors are at 0 makes UI not scale with the window.\n- **`Node2D` for UI.** Buttons\u002Flabels parented under a `Node2D` won't theme or take focus\n  correctly. Keep UI under a `CanvasLayer`\u002F`Control` subtree.\n- **Focus lost on gamepad.** If nothing is focused, directional input does nothing. Call\n  `grab_focus()` on an initial control and ensure `focus_mode` is `FOCUS_ALL` (`FOCUS_CLICK`\n  is mouse-only, `FOCUS_NONE` never focuses).\n- **Theme vs theme override.** A `Theme` resource styles a whole subtree; `add_theme_*`\n  overrides one node. Overusing per-node overrides defeats centralized theming.\n- **`rect_*` properties are renamed.** Godot 3's `rect_size`\u002F`rect_position`\u002F`rect_min_size`\n  are now `size`\u002F`position`\u002F`custom_minimum_size` in 4.x.\n- **`mouse_filter`** on a full-rect Control can swallow clicks meant for nodes beneath it;\n  set `MOUSE_FILTER_IGNORE` on purely decorative panels.\n\n## References\n\n- For the anchor\u002Foffset math, every Container type, building\u002Fextending Theme and StyleBox\n  resources, focus neighbor wiring, and `CanvasLayer` for HUDs, read\n  `references\u002Flayout-and-theming.md`.\n\n## Related skills\n\n- `game-ui-ux` — cross-engine UI\u002FUX: responsive scaling, safe areas, focus navigation, screen flow.\n- `godot-animation` — Tween-based UI transitions and juicing.\n- `godot-signals-groups` — connecting UI events to game logic.\n- `input-systems` — rebindable input and multi-device focus.\n- `card-game` \u002F `visual-novel` — UI-heavy genre templates.\n","# Godot UI \u002F Control nodes (4.x)\n\nLay out responsive UI with `Control` anchors and `Container` nodes, style it with a\n`Theme`, and make it navigable by keyboard and gamepad. Targets **Godot 4.7**.\n\n## When to use\n\n- Use when building HUDs, menus, inventories, dialog boxes, or settings screens with\n  `Control`-derived nodes; arranging UI that adapts to window size; theming; or wiring\n  focus navigation for controller\u002Fkeyboard.\n\n**When *not* to use:** in-world 2D nodes (`Node2D`\u002Fsprites) → `godot-nodes-scenes`;\nanimating UI transitions → `godot-animation` (Tween); genre UIs like card hands →\n`card-game`\u002F`visual-novel`. For full input rebinding → `input-systems`.\n\n## Core workflow\n\n1. **Use `Control` nodes for UI**, not `Node2D`. Controls have a rect (position + size),\n   anchors, and participate in focus\u002Ftheming.\n2. **Anchor for responsiveness.** Anchors are fractions (0–1) of the parent rect that the\n   Control's edges stick to. Use the editor's **Layout** presets (Top-Left, Full Rect,\n   Center, etc.) instead of hand-placing pixels.\n3. **Let Containers position children.** Put children in a `VBoxContainer`,\n   `HBoxContainer`, `GridContainer`, `MarginContainer`, etc. — the container sets their\n   position\u002Fsize; you control flow with `size_flags`. Don't set child anchors inside a\n   container (it overrides them).\n4. **Style with a `Theme`.** Assign a `Theme` resource on a top Control; children inherit\n   it. Override per-node with theme overrides only when necessary.\n5. **Wire focus** so gamepad\u002Fkeyboard can move between buttons; set a default focused\n   control and define neighbors or rely on auto-neighbor.\n6. **Connect signals** (`pressed`, `toggled`, `text_submitted`, `value_changed`).\n\n## Patterns\n\n### 1. Responsive layout with anchors (code form)\n\n```gdscript\nextends Control\n\nfunc _ready() -> void:\n    # Stretch this panel to fill its parent (the editor's \"Full Rect\" preset).\n    # Setting only anchors (or `anchors_preset`) keeps the current offsets, so the\n    # control keeps its old rect; this call moves anchors AND resets offsets.\n    set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)\n    # Manual equivalent: anchor_left = 0; anchor_top = 0; anchor_right = 1;\n    # anchor_bottom = 1, then set all four offset_* to 0.\n```\n\n### 2. A menu built from containers + button signals\n\n```gdscript\nextends VBoxContainer    # children stack vertically, auto-sized\n\nfunc _ready() -> void:\n    for child in get_children():\n        if child is Button:\n            child.pressed.connect(_on_button_pressed.bind(child.name))\n    # Give the first button focus so a gamepad can navigate immediately.\n    if get_child_count() > 0:\n        (get_child(0) as Control).grab_focus()\n\nfunc _on_button_pressed(which: StringName) -> void:\n    match which:\n        \"PlayButton\":  get_tree().change_scene_to_file(\"res:\u002F\u002Fgame.tscn\")\n        \"QuitButton\":  get_tree().quit()\n```\n\n### 3. Size flags: make one child expand to fill leftover space\n\n```gdscript\n# In a HBoxContainer: a label on the left, a spacer that eats remaining width.\nfunc _ready() -> void:\n    $Label.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN\n    $Spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL   # grows to fill\n```\n\n### 4. Theme override for one node (without a full Theme resource)\n\n```gdscript\nfunc _ready() -> void:\n    # Per-node overrides: use add_theme_* (type-specific setters).\n    $Title.add_theme_font_size_override(\"font_size\", 32)\n    $Title.add_theme_color_override(\"font_color\", Color.GOLD)\n    $Panel.add_theme_stylebox_override(\"panel\", preload(\"res:\u002F\u002Fui\u002Fpanel.stylebox.tres\"))\n```\n\n## Pitfalls\n\n- **Mixing manual position with Containers.** A child of a `Container` cannot set its own\n  position\u002Fanchors — the container owns layout. To free-place, take the node out of the\n  container or use a plain `Control`\u002F`PanelContainer` wrapper. To nudge, rotate or scale a\n  container child (e.g. a hover pop) in 4.7+, set `offset_transform_enabled = true` and use\n  `offset_transform_position`\u002F`_rotation`\u002F`_scale`; the container leaves those alone.\n- **Anchors vs offsets.** Anchors are fractions of the parent; offsets are pixel deltas\n  from the anchored point. Set anchors via presets, then nudge with offsets. Setting only\n  position while anchors are at 0 makes UI not scale with the window.\n- **`Node2D` for UI.** Buttons\u002Flabels parented under a `Node2D` won't theme or take focus\n  correctly. Keep UI under a `CanvasLayer`\u002F`Control` subtree.\n- **Focus lost on gamepad.** If nothing is focused, directional input does nothing. Call\n  `grab_focus()` on an initial control and ensure `focus_mode` is `FOCUS_ALL` (`FOCUS_CLICK`\n  is mouse-only, `FOCUS_NONE` never focuses).\n- **Theme vs theme override.** A `Theme` resource styles a whole subtree; `add_theme_*`\n  overrides one node. Overusing per-node overrides defeats centralized theming.\n- **`rect_*` properties are renamed.** Godot 3's `rect_size`\u002F`rect_position`\u002F`rect_min_size`\n  are now `size`\u002F`position`\u002F`custom_minimum_size` in 4.x.\n- **`mouse_filter`** on a full-rect Control can swallow clicks meant for nodes beneath it;\n  set `MOUSE_FILTER_IGNORE` on purely decorative panels.\n\n## References\n\n- For the anchor\u002Foffset math, every Container type, building\u002Fextending Theme and StyleBox\n  resources, focus neighbor wiring, and `CanvasLayer` for HUDs, read\n  `references\u002Flayout-and-theming.md`.\n\n## Related skills\n\n- `game-ui-ux` — cross-engine UI\u002FUX: responsive scaling, safe areas, focus navigation, screen flow.\n- `godot-animation` — Tween-based UI transitions and juicing.\n- `godot-signals-groups` — connecting UI events to game logic.\n- `input-systems` — rebindable input and multi-device focus.\n- `card-game` \u002F `visual-novel` — UI-heavy genre templates.\n",{"name":5,"description":7},"main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Fgodot-ui-control","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill godot-ui-control",{"tool":37,"command":38},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill godot-ui-control",{"tool":40,"command":41},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill godot-ui-control","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fgodot-ui-control\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Flayout-and-theming.md","REFERENCE","参考文档",5045,"https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fgodot-ui-control\u002Freferences\u002Flayout-and-theming.md",[52,58,64,70,76,82],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]