ImGuiSystem
Dear ImGui integration for ceramic - fully backend-agnostic.
Everything goes through ceramic itself, so the SAME code runs on clay (native + web) and unity:
- INPUT: ceramic events are forwarded to ImGui's 1.87+ event queue
(
addMousePosEvent,addKeyEvent, ...), text goes through ceramic's text input sessions (IME-aware), driven byio.wantTextInput. - FRAME:
newFrame()at early update (before user code builds its UI inupdate()),render()at late update. - RENDERING:
ImGuiRenderableconsumes the draw data through the concretebackend.Drawduring the normal visuals pass (no imgui_impl_* backend). - TEXTURES: the 1.92
ImTextureDataprotocol handled with ceramic textures;ImTextureIDis a registry key (seeImGuiTextures).
Usage stays the same as before: make ImGui.* calls anywhere between
updates (typically in update()); frame boundaries are automatic.
Static Members
Name of the default font bundled with the plugin (Roboto-Medium), used
when the project does not provide its own imgui_font define.
Name of the default fallback font bundled with the plugin (Kosugi, for CJK glyph coverage), merged into the default font.
Shared ImGui system instance. Automatically created when first accessed.
Instance Members
True when ImGui wants the mouse (apps should ignore clicks then).
True when ImGui wants the keyboard.
The renderable that draws ImGui (its depth places the UI, default topmost).
The custom font loaded from the imgui_font define (if any).
It is also assigned to io.fontDefault; use it with
ImGui.pushFontFloat(customFont, size) for per-window sizes.
Multiplier applied to ceramic wheel deltas before feeding ImGui. The default (1/24) is calibrated for a comfortable trackpad feel with ceramic's wheel units; raise it if a notched mouse wheel feels too slow.
Private Members
| Name | Type |
|---|---|
buttonId |
Int |
| Returns |
|---|
| Int |
| Name | Type |
|---|---|
done |
Function |
Load fontId as the default ImGui font and, if fallbackId is provided,
merge its glyphs (e.g. CJK) into it. Both are binary asset names.
| Name | Type | Default |
|---|---|---|
fontId |
String | |
fallbackId |
String | (optional) |
| Name | Type |
|---|---|
delta |
Float |
| Name | Type |
|---|---|
delta |
Float |
| Name | Type |
|---|---|
key |
Key |
down |
Bool |
Characters flow through ceramic's text input sessions (IME-aware): we open a session while ImGui wants text, and forward what gets typed by diffing the session buffer (editing keys are handled by ImGui itself through the key events).
| Name | Type |
|---|---|
want |
Bool |
| Name | Type |
|---|---|
text |
String |
Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |
:build |
tracker.macros.EventsMacro.build() |
:autoBuild |
tracker.macros.EventsMacro.build() |
:build |
ceramic.macros.EntityMacro.buildForCompletion() |
:autoBuild |
ceramic.macros.EntityMacro.buildForCompletion() |