Godot UI (Control Nodes)
/godot-ui-control
Godot 4.7 interfaces with Control nodes: anchors, containers, themes and keyboard or gamepad focus navigation.
- 许可证
- Apache-2.0
- 出品
- GameSkill 出品
所属合集
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
我们测过
在 Godot 4.7.2 上通过 26/26 项检查(2026-10-28):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告这个 skill 做什么
什么时候触发
Build Godot 4.7 user interfaces with Control nodes: anchors and offsets for responsive layout, Container nodes (VBox/HBox/Grid/Margin) for automatic arrangement, Theme resources for consistent styling …
GameSkill 测过的版本
GameSkill 调优版:skill 文件取自提交 184b72be0288,按我们的 skill 流程加上可运行示例、测试报告、自检清单和中文指南。
协议:基于 gamedev-skills/awesome-gamedev-agent-skills(作者 gamedev-skills),协议 Apache-2.0。ZIP 保留协议文件(LICENSE, NOTICE),CHANGES.md 列出了 GameSkill 加的所有文件。

自检清单
- 界面用 Control 节点,不放在 Node2D 下面 / UI is built from Control nodes, not parented under Node2D
- 用锚点预设(如 set_anchors_and_offsets_preset)适配窗口,而不是写死像素 / Uses anchor presets (e.g. set_anchors_and_offsets_preset) to adapt to the window, not fixed pixels
- Container 的子节点不手动设置 position 或锚点,用 size_flags 控制伸缩 / Children of a Container don't set their own position or anchors; size_flags control stretching
- 风格放在顶层 Theme 里,单个节点的 add_theme_*_override 只用于例外 / Styling lives in a top-level Theme; per-node add_theme_*_override only for exceptions
- 启动时有控件 grab_focus(),按钮 focus_mode 为 FOCUS_ALL,方向键能走完所有按钮 / A control grabs focus at start, buttons use FOCUS_ALL, and arrow keys reach every button
中文指南
这个 skill 做什么
让 AI 用 Godot 4.7 的 Control 节点做界面:用 anchors 和 offsets 做自适应布局,用 VBox/HBox/Grid/Margin 等 Container 自动排版,用 Theme 资源统一风格,再接好键盘和手柄的焦点导航。
什么时候用
- 做 HUD、主菜单、暂停菜单、设置页、背包等界面
- 界面不跟着窗口缩放,或者按钮在 Container 里摆不到想要的位置
- 手柄或键盘按方向键没反应,焦点丢了
怎么装
下载本页的 ZIP,把 godot-ui-control/ 整个文件夹放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor),重启 agent。
最小示例
ZIP 里的 gameskill/examples/ 是一个 Godot 4.7 小工程「Lantern Keep」主菜单:居中的面板、MarginContainer 加 VBoxContainer 排版、音量滑条、右上角金币数,主题在代码里生成,方向键在按钮间循环,获得焦点的按钮用 4.7 的 offset transform 轻微放大。用 Godot 4.7 打开 project.godot 直接运行。
我们怎么测的
在 Godot 4.7.2 无头模式下跑 14 项检查:全屏锚点、面板居中、Container 间距 10 像素、Margin 16 像素、size flags 让滑条占满剩余宽度、Theme 字号和颜色被继承、初始焦点、真实 ui_down 输入按顺序移动焦点并循环、放大窗口后面板仍居中且金币数贴住右上角、按钮和滑条信号、焦点放大不改 Container 排版、背景不吞点击、没有 Godot 3 的 rect_* 写法;再用 OpenGL 渲染一张截图。结果在 gameskill/test-report.json。
搭配
game-ui-ux:跨引擎的界面和交互原则godot-ui-integration:把界面接到游戏逻辑上- GameSkill 的 game-ui-kit:现成的菜单和 HUD 组件
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-ui-control/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-ui-control.zip -o /tmp/gameskill-godot-ui-control.zip
unzip -oq /tmp/gameskill-godot-ui-control.zip -d .claude/skills
rm /tmp/gameskill-godot-ui-control.zip包含内容
- Worked steps: Responsive layout with anchors; A menu built from containers + button signals; Size flags: make one child expand to fill leftover space; Theme override for one node
- A pitfalls section with the mistakes to avoid
- Bundled 1 reference doc the agent reads when needed
- Written for Godot 4.7
适合
- Laying out a HUD, menu, or UI in a Godot project, working with Control/Container nodes, anchors, themes, or focus in a .tscn
试试这条提示词
Build a main menu with containers, a theme and gamepad focus navigation.关于这个 Skill
Build Godot 4.7 user interfaces with Control nodes: anchors and offsets for responsive layout, Container nodes (VBox/HBox/Grid/Margin) for automatic arrangement, Theme resources for consistent styling, and keyboard/gamepad focus navigation. Use when laying out a HUD, menu, or UI in a Godot project, working with Control/Container nodes, anchors, themes, or focus in a .tscn.
From the godot-ui-control SKILL.md in gamedev-skills/awesome-gamedev-agent-skills.
What's inside
- Responsive layout with anchors (code form)
- A menu built from containers + button signals
- Size flags: make one child expand to fill leftover space
- Theme override for one node (without a full Theme resource)
环境要求
- Godot 4.7
常见问题
肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)
告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。
- 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
- 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)
基于 gamedev-skills/awesome-gamedev-agent-skills (作者 gamedev-skills,协议 Apache-2.0)。ZIP 里保留原作者的 LICENSE 和 NOTICE,ATTRIBUTION.md 和 CHANGES.md 写明来源提交和 GameSkill 加的内容。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Game UI/UX
HUDs and menus that work on every screen: anchored layouts, resolution and safe-area scaling, gamepad focus and event-driven updates.
Godot Animation
Animate in Godot 4.7 with AnimationPlayer clips, AnimationTree state machines and blend spaces, and code-driven Tweens.
Godot Signals & Groups
Decoupled Godot 4.7 gameplay with signals and groups: custom signals, Callable connections and broadcasts with call_group.
Game Input Systems
Game input architecture: action mapping, rebinding with conflict checks, keyboard, gamepad and touch, deadzones, buffering and coyote time.
Awesome Gamedev Agent Skills 中的更多 Skills
查看全部 42 个2D Platformer
Build a 2D platformer: run/jump control with coyote time, jump buffering, and variable jump height, plus tiled levels and hazards.
Behavior Trees & Utility AI
Build a behavior-tree runtime and a Utility AI system with response curves, plus hybrid agents where the behavior tree drives utility scoring.
Bevy ECS
Structure a Bevy app around ECS: plugins, components and resources, systems with Query and Commands, system ordering and Time.
Create Game Assets
Plan, generate, source, normalize, and validate cohesive visual game assets.
相似 skills
Localize (Claude Code Game Studios)
Localization pipeline — find hardcoded strings, extract string tables, cultural review, VO, RTL, enforce string freeze.
Godot AI
Production-grade MCP server and editor plugin for Godot 4.7+: 46 tools and 120+ operations for scenes, nodes, scripts, UI and more.
GodotPrompter
Agentic skills framework for Godot 4.x: domain-specific skills for project setup, architecture and gameplay systems.
Godot UI Integration
A Codex skill for building Godot UI from approved designs, with editor-visible scenes and runtime visual-parity checks.