Loading...
Loading...
MSW `.ui` single entry point — design + component API + builder + runtime. Anchor/pivot/RectTransform, UIGroup/CanvasGroup hierarchy, layout recipes (HUD/popup/toast/menu/inventory/scroll-list), full API tables for ButtonComponent/TextComponent/SpriteGUIRendererComponent/ScrollLayoutGroup/GridView/TextInput/Slider/Mask/AvatarGUIRenderer + UI enums (AlignmentType/OverflowType/ImageType/FillAmount), `.mlua` runtime patterns (popup open-close, toast, HP bar, GridView, drag, tab, cooldown, world nametag), UI-client-only caveats (nil on server, no RPC), `.ui`↔`.mlua` UUID auto-binding (write+inject_bindings), resolution/safe-area/touch. UIBuilder (msw_ui_builder.cjs): all node types (panel/text/sprite/button/slider/scroll_layout/text_input/group/mask/grid_view/avatar/skeleton etc.), component add/replace/patch/remove, 13 anchor presets+stretch, auto-inject .mlua UUID bindings after write.
npx skill4agent add msw-git/msw-ai-coding-plugins-official msw-ui-system.ui| Skill | Responsibility |
|---|---|
| Everything |
| Pre-built style bundles — |
| Trigger | Reference Document |
|---|---|
| "anchor/pivot/coordinates/why is the position wrong", "RectTransform", "stretch" | |
| "mobile", "safe area", "1920", "MobileOnly", "ActivePlatform", "touch size", "PC reserved zone", "font size by device" | |
| "UIGroup", "above popup", "z-order", "displayOrder", "CanvasGroup", "opacity propagation", "Enable vs Visible" | |
| "which component", "Sprite vs Text vs Button", "9-slice", "scroll list", "GridView vs ScrollLayoutGroup" | |
| "make a HUD", "popup placement", "toast", "menu", "inventory grid", "scroll list" | |
| "connect .mlua after building with .ui builder", "property default UUID", "binding without drag" | |
Runtime UI component field read/write, component property name/type ( | |
Enum values ( | |
| Runtime mlua patterns (popup open/close, toast fade, HP bar, GridView, drag, tab, cooldown), Runtime UI Caveats (client-only, server-side nil, etc.) | |
| |
(1) Clarify intent Layout sketch (ASCII or verbal) + which group to attach to
(2) Check design guide Match at least one of ui-fundamentals / ui-hierarchy / component-api §Component Selection Guide
(3) Match recipe Select the closest template from layout-recipes.md
(4) Invoke builder Create/patch via scripts/msw_ui_builder.cjs (protocol: builder-protocol.md)
(5) Inject bindings Auto-inject .mlua property default UUIDs via b.write(path, { bind: {...} }) or b.inject_bindings(...) (builder-protocol.md §"Binding Injection")
(6) Self-verify write() auto-runs scripts/ui_lint.cjs (strict ON by default)
(7) Preview Visual check via scripts/preview_ui_layout.cjs
(8) Maker Refresh Apply to engine.ui.uiscripts/msw_ui_builder.cjs@components.uiUIBuilder.read(filepath).find().list_entities().uiReadcattypeGet-ContentrggrepsedawkcpmvUIBuilder.read/load/snapshotb.write().uiPositionanchoredPositionanchoredPosition.mluaui-fundamentalsui-hierarchycomponent-apipos = ±(margin + size/2)AlignmentUpperLeft(0)references/ui-fundamentals.mdreferences/ui-hierarchy.mdreferences/component-api.mdreferences/layout-recipes.mdreferences/runtime-patterns.md.mluareferences/builder-protocol.md.ui.mluareferences/templates/templates.mdstyle-N-*.uiruid-map.mdPopupbutton.mluascripts/msw_ui_builder.cjs.uireferences/builder-protocol.mdscripts/preview_ui_layout.cjs.uiscripts/ui_lint.cjs.uiwrite()scripts/ui_recipe.cjs.map.model.tileset.ui@type@componentsTransition.Disabledui_lint.cjspreview_ui_layout.cjsMaterialId