← ClaudeAtlas

imgui-guidelisted

Use when designing or implementing an immediate-mode GUI (IMGUI): batching the whole UI into one draw call with compact primitive buffers, keying controls by stable IDs, resolving ordering with frame-delayed state, keyboard focus / responder chains / event trickling, drag-and-drop, per-monitor DPI scaling, string localization, and screen-reader accessibility. Triggers on immediate-mode widgets, retained-vs-immediate UI, hover/active/focus IDs, UI draw batching, ImGui-style code, localizing UI strings, accessibility/screen-reader support for an IMGUI, even when the user doesn't say 'IMGUI'.
xonovex/platform · ★ 5 · AI & Automation · score 72
Install: claude install-skill xonovex/platform
# Immediate-Mode GUI Guidelines Architecture for an immediate-mode GUI: the UI is re-issued every frame from application data, controls are identified by id rather than retained objects, and the few things that must persist (hover, focus, drag, DPI) live in a small, deliberate state store. For how the resulting vertex/index data reaches the GPU, see **gpu-rendering-guide**. ## Requirements - The UI is rebuilt every frame; widgets return their result inline (`if (button(id, ...))`), they are not retained objects. - A small per-frame and cross-frame state store holds only what immediate mode cannot recompute: hover, active, focus, drag, layout. ## Essentials - **One draw call** - Pack all widgets into compact primitive buffers and synthesize vertices in the shader; encode clip and texture so no state switches are needed, see [references/draw-batching.md](references/draw-batching.md) - **Stable unique IDs** - Key hover, active, focus, drag, and tab order by per-control id: the substitute for retained widget objects, see [references/ids-and-state.md](references/ids-and-state.md) - **Frame delay resolves ordering** - Immediate mode can't see later controls; defer hover/focus decisions one frame so the last-drawn control wins, see [references/frame-delay.md](references/frame-delay.md) - **Process events in end\_\*(), consume by clearing** - Trickle keyboard events through a responder chain; one event per frame, see [references/events-and-focus.md](references/events-and-focus.m