Skip to content

feat(ui): UI-Core foundation — scene.ui, focus/keyboard, widgets#138

Merged
Exoridus merged 1 commit into
mainfrom
feat/ui-core
Jun 20, 2026
Merged

feat(ui): UI-Core foundation — scene.ui, focus/keyboard, widgets#138
Exoridus merged 1 commit into
mainfrom
feat/ui-core

Conversation

@Exoridus

Copy link
Copy Markdown
Owner

v0.14 Phase 4A — UI-Core, PR 1 of 2 (additive, non-breaking).

What

  • Graphics.drawRoundedRectangle + buildRoundedRectangle (math/geometry)
  • FocusManager (app.focus / stage.focus): single-focus tracking, Tab / Shift+Tab traversal, focus-scope stack, keyboard routing to the focused node — node.focusable/tabIndex/onFocus/onBlur/onKeyDown + KeyEvent
  • Modal input capture: InteractionManager.pushInputCapture / popInputCapture
  • scene.ui (UIRoot): screen-fixed UI layer, auto-rendered above the world. UI is hit-tested in screen space ahead of the camera world, so widgets stay clickable/focusable under a panned/zoomed camera (UI nodes use a no-op stage and stay out of the world quadtree).
  • Widgets: Widget base (size / anchoring / enabled) + Label / Panel / Button / ProgressBar + Stack (row/column layout)
  • Example: examples/ui/hud-and-widgets (+ chapter/catalog entry)

Tests / gates

New tests: math/geometry, input/focus, input/interaction (capture), ui/scene-ui, ui/widgets. All CI-only gates green locally (pnpm test 3265, typecheck, lint:all, format:check, typecheck:examples/guides, docs:api:check, root-index).

Follow-up (PR2, breaking)

Scene-stack simplification (#11): remove SceneStackMode/Participation + pushScene/popScene, migrate overlay examples onto scene.ui, add the UI guide.

Additive UI-Core system (v0.14 Phase 4A, PR1 of 2):

- Graphics.drawRoundedRectangle + buildRoundedRectangle (math/geometry)
- FocusManager (app.focus / stage.focus): single-focus tracking, Tab/Shift-Tab
  traversal, focus-scope stack, keyboard routing to the focused node
  (node.focusable/tabIndex/onFocus/onBlur/onKeyDown) + KeyEvent
- Modal input capture: InteractionManager.pushInputCapture/popInputCapture
- scene.ui (UIRoot): screen-fixed UI layer auto-rendered above the world; UI is
  hit-tested in screen space ahead of the camera world, so widgets stay
  clickable/focusable under a panned camera (UI nodes kept out of the quadtree)
- Widgets: Widget base (size/anchoring/enabled) + Label/Panel/Button/ProgressBar
  + Stack (row/column layout)
- Example: examples/ui/hud-and-widgets + chapters/catalog entry

Scene-stack simplification (#11) and overlay-example migration follow in PR2.
@Exoridus Exoridus enabled auto-merge (squash) June 20, 2026 03:21
@Exoridus Exoridus merged commit cc02700 into main Jun 20, 2026
12 checks passed
@Exoridus Exoridus deleted the feat/ui-core branch June 20, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant