godotuicontrol
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "godotuicontrol" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b5bf74fcd49bdfe336ed32c04971eecb3a7f19983edd048ca4db9aa4ad72f545. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/godot-ui-control-kfqy before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A dedicated skill for GodotUiControl, intended to help AI agents efficiently perform tasks related to GodotUiControl.
Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Lay out responsive UI with `Control` anchors and `Container` nodes, style it with a `Theme`, and make it navigable by keyboard and gamepad. Targets **Godot 4.3+**.
- Audience
- Use when building HUDs, menus, inventories, dialog boxes, or settings screens with `Control`-derived nodes; arranging UI that adapts to window size; theming; or wiring focus navigation for controller/keyboard. When *not* to use:** in-world 2D nodes (`Node2D`/sprites) → `godot-nodes-scenes`; animating UI transitions → `godot-animation` (Tween); genre UIs like card hands → `card-game`/`visual-novel`. For full input rebinding → `input-systems`.
- Testing
- Not tested
Browse files
Frontmatter
name: Godotuicontrol
slug: godot-ui-control
version: 1.0.0
displayName: Godotuicontrol
description: >
GodotUiControl专用技能,帮助AI Agent高效完成相关任务。
summary: "GodotUiControl专用技能,帮助AI Agent高效完成相关任务。"
license: Apache-2.0
category: 游戏开发
framework:
- Claude Code
- Codex
- Hermes Agent
- OpenClaw
- QClaw
- WorkBuddy
platform: multi-platform
homepage: https://github.com/1991513ccie-png
repository: https://github.com/1991513ccie-pngGodot UI / Control nodes (4.x)
Lay out responsive UI with Control anchors and Container nodes, style it with a
Theme, and make it navigable by keyboard and gamepad. Targets Godot 4.3+.
When to use
- Use when building HUDs, menus, inventories, dialog boxes, or settings screens with
Control-derived nodes; arranging UI that adapts to window size; theming; or wiring focus navigation for controller/keyboard.
When not to use: in-world 2D nodes (Node2D/sprites) → godot-nodes-scenes;
animating UI transitions → godot-animation (Tween); genre UIs like card hands →
card-game/visual-novel. For full input rebinding → input-systems.
Core workflow
- Use
Controlnodes for UI, notNode2D. Controls have a rect (position + size), anchors, and participate in focus/theming. - Anchor for responsiveness. Anchors are fractions (0–1) of the parent rect that the Control's edges stick to. Use the editor's Layout presets (Top-Left, Full Rect, Center, etc.) instead of hand-placing pixels.
- Let Containers position children. Put children in a
VBoxContainer,HBoxContainer,GridContainer,MarginContainer, etc. — the container sets their position/size; you control flow withsize_flags. Don't set child anchors inside a container (it overrides them). - Style with a
Theme. Assign aThemeresource on a top Control; children inherit it. Override per-node with theme overrides only when necessary. - Wire focus so gamepad/keyboard can move between buttons; set a default focused control and define neighbors or rely on auto-neighbor.
- Connect signals (
pressed,toggled,text_submitted,value_changed).
Patterns
1. Responsive layout with anchors (code form)
extends Control
func _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
2. A menu built from containers + button signals
extends VBoxContainer # children stack vertically, auto-sized
func _ready() -> void:
for child in get_children():
if child is Button:
child.pressed.connect(_on_button_pressed.bind(child.name))
# Give the first button focus so a gamepad can navigate immediately.
if get_child_count() > 0:
(get_child(0) as Control).grab_focus()
func _on_button_pressed(which: StringName) -> void:
match which:
"PlayButton": get_tree().change_scene_to_file("res://game.tscn")
"QuitButton": get_tree().quit()
3. Size flags: make one child expand to fill leftover space
# In a HBoxContainer: a label on the left, a spacer that eats remaining width.
func _ready() -> void:
$Label.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
$Spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL # grows to fill
4. Theme override for one node (without a full Theme resource)
func _ready() -> void:
# Per-node overrides: use add_theme_* (type-specific setters).
$Title.add_theme_font_size_override("font_size", 32)
$Title.add_theme_color_override("font_color", Color.GOLD)
$Panel.add_theme_stylebox_override("panel", preload("res://ui/panel.stylebox.tres"))
Pitfalls
- Mixing manual position with Containers. A child of a
Containercannot set its own position/anchors — the container owns layout. To free-place, take the node out of the container or use a plainControl/PanelContainerwrapper. - Anchors vs offsets. Anchors are fractions of the parent; offsets are pixel deltas from the anchored point. Set anchors via presets, then nudge with offsets. Setting only position while anchors are at 0 makes UI not scale with the window.
Node2Dfor UI. Buttons/labels parented under aNode2Dwon't theme or take focus correctly. Keep UI under aCanvasLayer/Controlsubtree.- Focus lost on gamepad. If nothing is focused, directional input does nothing. Call
grab_focus()on an initial control and ensurefocus_modeis notFOCUS_NONE. - Theme vs theme override. A
Themeresource styles a whole subtree;add_theme_*overrides one node. Overusing per-node overrides defeats centralized theming. - *`rect_
properties are renamed.** Godot 3'srect_size/rect_position/rect_min_sizeare nowsize/position/custom_minimum_size` in 4.x. mouse_filteron a full-rect Control can swallow clicks meant for nodes beneath it; setMOUSE_FILTER_IGNOREon purely decorative panels.
References
- For the anchor/offset math, every Container type, building/extending Theme and StyleBox
resources, focus neighbor wiring, and
CanvasLayerfor HUDs, readreferences/layout-and-theming.md.
Related skills
game-ui-ux— cross-engine UI/UX: responsive scaling, safe areas, focus navigation, screen flow.godot-animation— Tween-based UI transitions and juicing.godot-signals-groups— connecting UI events to game logic.input-systems— rebindable input and multi-device focus.card-game/visual-novel— UI-heavy genre templates.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供 Godot 4.x UI 开发的完整工作流和最佳实践
- 包含多个可直接复用的代码示例和常见陷阱规避指南
Areas to improve
-
description内容重复 Reported severity: Minor
顶层 frontmatter 和 skill_body 内均包含相同 description 内容
Recommendation: 建议移除 skill_body 内重复的 description 字段,保持单一数据源
Highlights
- When to use 章节清晰界定适用与不适用场景,边界明确
Areas to improve
-
缺少显式出口条件说明 Reported severity: Minor
核心工作流中未明确说明任务完成后的出口条件或验证标准
Recommendation: 建议在 Core workflow 末尾添加'完成标准:UI可响应式布局、焦点可导航、信号已连接'
Highlights
- 结构完整,包含工作流、模式、陷阱、参考等必要章节
- 提供多个端到端代码示例,便于直接应用
Highlights
- 所有代码示例语法正确,符合 Godot 4.3+ API 规范
- 覆盖主要异常场景(如焦点丢失、鼠标过滤问题)并提供解决方案
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.