godot-ui-containers by thedivergentai/gd-agentic-skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-ui-containers容器自动布局、尺寸标志、锚点和分割比例定义了响应式 UI 系统。
基于断点的响应式布局专家级容器构建器。
根据可用宽度自动调整列数的 GridContainer。
基于可用宽度和项目最小尺寸的动态 Grid 列专家逻辑。
安全的 ScrollContainer 管理。处理添加日志或聊天时常见的"一帧延迟"错误。
高性能的 UI 内 3D 设置。使用 stretch_shrink 和 transparent_bg 进行角色预览。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
动态标签页生成、自定义标题和标签页关闭逻辑的模式。
使用 HFlowContainer 的自动换行项目列表,对于标签云和响应式菜单至关重要。
优化架构。用轻量级的 Anchor 和 Offset 逻辑替代深度嵌套的容器。
通过 NOTIFICATION_SORT_CHILDREN 实现径向/圆形布局的专家级自定义容器逻辑。
用于交互式 UI 列表的动态兄弟节点重排序和动画逻辑。
使用 AspectRatioContainer 在流体窗口调整大小时强制执行严格的宽高比(例如 1:1, 16:9)。
使用 SIZE_EXPAND_FILL 和 stretch_ratio 实现加权布局的高级尺寸逻辑。
position 或 size — 容器在 queue_sort() 期间会覆盖子节点的变换。请改用 custom_minimum_size 或 size_flags [1]。size_flags — 默认值是 SIZE_SHRINK_BEGIN。除非你为响应式容器设置 SIZE_EXPAND_FILL,否则子节点将保持微小尺寸。columns 的情况下使用 GridContainer — 默认值为 1,这会创建一个简单的垂直列表。对于响应式换行,请改用 HFlowContainer [8]。add_theme_constant_override("separation", value) 来获得专业的呼吸空间。ScrollContainer — 没有它,容器可能会坍缩为零或无限扩展,破坏滚动机制。scroll_vertical 之前 await get_tree().process_frame [5]。SubViewportContainer 来改变其大小 — 这会扭曲渲染内容。请调整边距或使用 stretch 和 stretch_shrink 属性代替 [2]。mouse_filter 保持为默认值 — 输入事件可能无法传递给子节点。使用 MOUSE_FILTER_PASS 或 STOP 以确保事件能向下传递 [6]。GridContainer 进行响应式换行 — 如果你希望项目基于宽度换行,请使用 HFlowContainer。GridContainer 强制执行严格的列数 [7]。position 进行动画处理 — 在过渡期间,使用 Tween 对 custom_minimum_size 进行动画处理,以平滑地"推动"兄弟节点 [1]。# VBoxContainer 示例
# 自动垂直堆叠子节点
# 子节点:
# Button ("Play")
# Button ("Settings")
# Button ("Quit")
# 设置项目之间的间距
$VBoxContainer.add_theme_constant_override("separation", 10)
# 使用锚点和尺寸标志
func _ready() -> void:
# 扩展以填满父节点
$MarginContainer.set_anchors_preset(Control.PRESET_FULL_RECT)
# 添加边距
$MarginContainer.add_theme_constant_override("margin_left", 20)
$MarginContainer.add_theme_constant_override("margin_right", 20)
# 控制子节点在容器中的扩展方式
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.size_flags_vertical = Control.SIZE_SHRINK_CENTER
每周安装数
73
代码仓库
GitHub 星标数
59
首次出现
2026 年 2 月 10 日
安全审计
已安装于
opencode70
codex69
gemini-cli69
github-copilot68
kimi-cli67
amp67
Container auto-layout, size flags, anchors, and split ratios define responsive UI systems.
Expert container builder with breakpoint-based responsive layouts.
Auto-adjusting GridContainer that changes column count based on available width.
Expert logic for dynamic Grid columns based on available width and item minimum size.
Safe ScrollContainer management. Handles the common "one-frame delay" bug when adding logs or chat.
High-performance 3D-in-UI setup. Uses stretch_shrink and transparent_bg for character previews.
Pattern for dynamic tab spawning, custom titles, and tab closing logic.
Wrapping item lists using HFlowContainer, essential for tag clouds and responsive menus.
Optimization architecture. Replaces deep container nesting with lightweight Anchor and Offset logic.
Expert custom container logic implementing a radial/circle layout via NOTIFICATION_SORT_CHILDREN.
Dynamic sibling reordering and animation logic for interactive UI lists.
Enforcing strict aspect ratios (e.g. 1:1, 16:9) across fluid window resizes using AspectRatioContainer.
Advanced sizing logic using SIZE_EXPAND_FILL and stretch_ratio for weighted layouts.
position or size in a Container — Containers override child transforms during queue_sort(). Use custom_minimum_size or size_flags instead [1].size_flags for expansion — Default is SIZE_SHRINK_BEGIN. Children will stay tiny unless you set SIZE_EXPAND_FILL for responsive containers.GridContainer without setting columns — Default is 1, creating a simple vertical list. For responsive wrapping, use instead [8].# VBoxContainer example
# Automatically stacks children vertically
# Children:
# Button ("Play")
# Button ("Settings")
# Button ("Quit")
# Set separation between items
$VBoxContainer.add_theme_constant_override("separation", 10)
# Use anchors and size flags
func _ready() -> void:
# Expand to fill parent
$MarginContainer.set_anchors_preset(Control.PRESET_FULL_RECT)
# Add margins
$MarginContainer.add_theme_constant_override("margin_left", 20)
$MarginContainer.add_theme_constant_override("margin_right", 20)
# Control how children expand in containers
button.size_flags_horizontal = Control.SIZE_EXPAND_FILL
button.size_flags_vertical = Control.SIZE_SHRINK_CENTER
Weekly Installs
73
Repository
GitHub Stars
59
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode70
codex69
gemini-cli69
github-copilot68
kimi-cli67
amp67
TanStack Query v5 完全指南:React 数据管理、乐观更新、离线支持
2,500 周安装
HFlowContaineradd_theme_constant_override("separation", value) for professional breathing room.ScrollContainer without a minimum size — Without it, the container may collapse to zero or expand infinitely, breaking the scroll mechanism.await get_tree().process_frame before setting scroll_vertical [5].SubViewportContainer to change its size — This distorts the rendered contents. Adjust margins or use stretch and stretch_shrink properties instead [2].mouse_filter on default for layered Viewports — Input events might not reach children. Use MOUSE_FILTER_PASS or STOP to ensure events drill down [6].GridContainer for responsive wrapping — Use HFlowContainer if you want items to wrap based on width. GridContainer enforces a strict column count [7].position directly inside a container — Use Tween on custom_minimum_size to smoothly "push" siblings during transitions [1].