editor-ui-infrastructure

Build editor panels using reusable ImGui drawers and EditorUIConstants.

13|2|Updated Jul 17, 2023
One-click install
npx skills add https://github.com/kateusz/GameEngine --skill editor-ui-infrastructure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: editor-ui-infrastructure
Source: https://github.com/kateusz/GameEngine/tree/main/.claude/skills/editor-ui-infrastructure
Command: npx skills add https://github.com/kateusz/GameEngine --skill editor-ui-infrastructure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill guides developers in leveraging the engine's comprehensive UI infrastructure (Drawers, Elements, FieldEditors, EditorUIConstants) to build visually consistent, maintainable, and user-friendly editor panels and component editors. It eliminates the need to write repetitive ImGui code, ensuring a unified look and feel across the entire editor.

Core Features & Use Cases

  • Reusable UI Components: Utilize ButtonDrawer for consistent buttons, ModalDrawer for dialogs, and TextureDropTarget for asset drag-and-drop.
  • Type-Safe Field Editors: Integrate IFieldEditor for generic, reflection-based property editing in the Script Inspector.
  • Global Styling: Enforce consistent sizing, spacing, and colors using EditorUIConstants across all UI elements.
  • Use Case: When developing a new ContentBrowserPanel, this Skill ensures that asset previews use TextureDropTarget for drag-and-drop, action buttons use ButtonDrawer for consistent styling, and all spacing adheres to EditorUIConstants.

Quick Start

Explain how to use ButtonDrawer to create a primary action button and ModalDrawer for a confirmation dialog in a new editor panel.

Frequently Asked Questions about editor-ui-infrastructure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build consistent editor UI across ImGui panels and component editors?

Consistent editor UI relies on EditorUIConstants for unified styling, Drawers (ButtonDrawer, ModalDrawer, TableDrawer) for reusable components, and Elements (TextureDropTarget, ComponentSelector) for common editor interactions. This Skill provides the infrastructure to enforce predictable sizing, spacing, and semantic colors across all editor panels, eliminating repetitive ImGui code and ensuring a cohesive look and feel throughout the editor.

What drawers and elements should I use for drag-and-drop and data rendering in editor panels?

Use TextureDropTarget for asset drag-and-drop, TableDrawer for structured data rendering, and EntityContextMenu for contextual interactions. ButtonDrawer provides consistent button styling, ModalDrawer handles dialogs, and TreeDrawer organizes hierarchical data. EditorUIConstants automatically size and color these elements, reducing boilerplate and ensuring maintainable, semantically correct UI across panels.

Can I reduce ImGui boilerplate when building custom editor panels?

Yes. The callback-based API of Drawers and FieldEditors eliminates repetitive ImGui code by providing type-safe, reflection-based property editing through IFieldEditor, automatic sizing via EditorUIConstants, and reusable components like ButtonDrawer and ModalDrawer. This approach maintains consistency while reducing setup and maintenance overhead for new ContentBrowserPanel and component editor implementations.

How do field editors work for property panels in the Script Inspector?

Field editors implement IFieldEditor for generic, reflection-based property editing. They integrate with EditorUIConstants for automatic styling and sizing, enabling type-safe editing of component properties without writing custom ImGui code. This callback-driven design ensures predictable behavior and consistent UI across all property panels in the Script Inspector and custom editor panels.

When should I use EditorUIConstants instead of hardcoding spacing and colors?

Always use EditorUIConstants for spacing, sizing, and semantic colors across editor UI. Hardcoding values creates inconsistency and maintenance burden when design changes. EditorUIConstants enforces a unified style globally, ensures tooltip support and drag-and-drop behavior work predictably, and simplifies updates to the editor's visual identity without touching individual panel code.

What's the difference between using Drawers directly versus building custom ImGui code?

Drawers (ButtonDrawer, ModalDrawer, TableDrawer, TreeDrawer, LayoutDrawer, TextDrawer) provide pre-built, styled components with consistent behavior and automatic sizing via EditorUIConstants. Custom ImGui code requires manual styling, spacing, and color management, leading to inconsistency and higher maintenance. Drawers reduce boilerplate, ensure semantic correctness, and guarantee predictable UI across the entire editor infrastructure.