The ui:: widget layer and the theme #40

Open
UnflavoredMeson/Primal_Plus_Plus
opened 2026-11-24 20:16:00 +00:00 by UnflavoredMeson · 0 comments
Owner

Why

Panels written straight against ImGui are hard to restyle and impossible to test. A thin ui:: layer keeps ImGui in one place and gives the editor its own look.

Decided

  • The look: an anti-aliased TTF UI font (Inter) with merged vector icons (Lucide), more padding, light rounding (docked panes flush), neutral dark grays with desaturated accents (bright colours only for warnings, gizmos and primary actions), two-column property grids, grouped sections, colour-coded axis fields, no collapse button on docked panels.
  • Fonts downloaded and pinned; copied to x64/<Config>/fonts/.
  • A headless smoke test runs ImGui frames without a window and checks every panel draws without asserting. Dear ImGui Test Engine isn't used (its licence isn't MIT).

Read first

Steps

  • 1. Write Editor/UI/Theme.* and load the fonts.
  • 2. Write the first ui:: widgets (property row, vector field with axis colours, section).
  • 3. Write the headless smoke test.

Done when

  • The smoke test passes in UnitTests; the theme looks right to you; 0 warnings; tidy 0.

Claude can help with

  • Matching a look you point at, and the font-merging setup.

Learn

  • How ImGui's style variables and colour stacks work.
## Why Panels written straight against ImGui are hard to restyle and impossible to test. A thin `ui::` layer keeps ImGui in one place and gives the editor its own look. ## Decided - The look: an anti-aliased TTF UI font (Inter) with merged vector icons (Lucide), more padding, light rounding (docked panes flush), neutral dark grays with desaturated accents (bright colours only for warnings, gizmos and primary actions), two-column property grids, grouped sections, colour-coded axis fields, no collapse button on docked panels. - Fonts downloaded and pinned; copied to `x64/<Config>/fonts/`. - A headless smoke test runs ImGui frames without a window and checks every panel draws without asserting. Dear ImGui Test Engine isn't used (its licence isn't MIT). ## Read first - [Preferences](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Preferences), "The editor's look"; [Plan-2026-11-24-editor-step2-offscreen-views](https://forgejo.unflavoredmeson.com/UnflavoredMeson/Primal_Plus_Plus/wiki/Plan-2026-11-24-editor-step2-offscreen-views). ## Steps - [ ] 1. Write `Editor/UI/Theme.*` and load the fonts. - [ ] 2. Write the first `ui::` widgets (property row, vector field with axis colours, section). - [ ] 3. Write the headless smoke test. ## Done when - [ ] The smoke test passes in UnitTests; the theme looks right to you; 0 warnings; tidy 0. ## Claude can help with - Matching a look you point at, and the font-merging setup. ## Learn - How ImGui's style variables and colour stacks work.
Sign in to join this conversation.
No assignees
No project
No milestone
Blocks Depends on
#39 Dear ImGui in the engine
UnflavoredMeson/Primal_Plus_Plus
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
UnflavoredMeson/Primal_Plus_Plus#40
No description provided.