Expand description
UI surface for standalone Khora tools (the hub, future asset cookers, …).
These tools depend on khora-sdk and reach the egui backend
exclusively through this module — never directly via egui
or eframe. The day the engine swaps backend, this re-export
list moves to whichever crate provides the new
run_native + AppContext implementation.
This module is the runtime seam only. Khora’s look — the brand
palette and the shared widget vocabulary — is cosmetics and lives in
the separate khora-tool-ui crate, which the SDK deliberately does
not depend on, so a game built on Khora never compiles the engine
vendor’s brand. Tools depend on both.
Structs§
- Align2
- Two-axis alignment — combination of horizontal + vertical
Align. - Corner
Radius - Per-corner radius of a rounded rectangle, in logical pixels.
- Font
Pack - A collection of fonts grouped by family.
- Interaction
- Result of an
UiBuilder::interact_rectcall. - Linear
Rgba - Represents a color in a linear RGBA color space using
f32components. - Margin
- Padding (or outer spacing) on the four sides of a region.
- Named
Font - A named font face inside a pack. The name is used by the backend to register the font in its registry and (where applicable) to make it addressable by user code.
- Rect2D
- A 2D axis-aligned rectangle defined by its top-left corner (
min) and bottom-right corner (max). - Stroke
- A border or line stroke — colour + thickness.
- UiTheme
- Color palette and sizing tokens for any Khora UI surface.
- Vec2
- A 2-dimensional vector with
f32components. - Window
Config Input - Owned-data window config — mirrors fields of
WindowConfigbut stays inkhora-infraso we don’t drag the platform module definition all the way down tokhora-corefor tool-only use. - Window
Icon Input - RGBA8 pixel buffer + dimensions for the window icon.
Enums§
- Align
- One-axis alignment —
Min(top/left),Center, orMax(bottom/right). - Font
Family Hint - Font family hint passed to
UiBuilder::paint_text_styled. Backends map each variant to whichever face was registered for that family. - Font
Handle - A bundled font, either as a static slice or owned bytes loaded at runtime.
- Icon
- A semantic icon identifier mapped to a Lucide codepoint.
- Inline
Edit Event - Outcome of an
UiBuilder::inline_text_fieldthis frame. - Text
Align - Horizontal alignment for
UiBuilder::paint_text_styled.
Traits§
- App
- One application — implements
updateand gets called once per frame. - AppContext
- Top-level app context — one per frame.
- AppLifecycle
- Optional lifecycle hooks — implement on the same type as
Appto hook startup / shutdown without inflating the main trait. - UiBuilder
- A backend-agnostic, immediate-mode widget builder.
Functions§
- run_
native - Boot a tool app on the egui+eframe backend.