Documentation
¶
Overview ¶
Package debugui provides immediate-mode GUI integration for ECS applications using Dear ImGui. It manages ImGui rendering and input state through ECS components and systems.
Index ¶
- func RegisterDebugUIComponents(registry *ecs.ComponentRegistry)
- func SpawnDebugUI(storage *ecs.Storage)
- type ArchetypeInfo
- type ArchetypeViewerCache
- type ArchetypeViewerComponent
- type ComponentInspectorComponent
- type EntityBrowserCache
- type EntityBrowserComponent
- type EntityInfo
- type FieldInfo
- type FrameTimer
- type ImguiInputState
- type ImguiItem
- type ImguiSystem
- type PerformanceStatsComponent
- type QueryDebuggerCache
- type QueryDebuggerComponent
- type ReflectionCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDebugUIComponents ¶
func RegisterDebugUIComponents(registry *ecs.ComponentRegistry)
func SpawnDebugUI ¶
Types ¶
type ArchetypeInfo ¶
type ArchetypeViewerCache ¶
type ArchetypeViewerCache struct {
// contains filtered or unexported fields
}
type ArchetypeViewerComponent ¶
type ArchetypeViewerComponent struct {
// contains filtered or unexported fields
}
func NewArchetypeViewerComponent ¶
func NewArchetypeViewerComponent() ArchetypeViewerComponent
type ComponentInspectorComponent ¶
type ComponentInspectorComponent struct {
// contains filtered or unexported fields
}
func NewComponentInspectorComponent ¶
func NewComponentInspectorComponent() ComponentInspectorComponent
type EntityBrowserCache ¶
type EntityBrowserCache struct {
// contains filtered or unexported fields
}
type EntityBrowserComponent ¶
type EntityBrowserComponent struct {
// contains filtered or unexported fields
}
func NewEntityBrowserComponent ¶
func NewEntityBrowserComponent(maxEntitiesPerPage int) EntityBrowserComponent
func (*EntityBrowserComponent) GetSelectedEntity ¶
func (eb *EntityBrowserComponent) GetSelectedEntity() ecs.EntityId
func (*EntityBrowserComponent) Render ¶
func (eb *EntityBrowserComponent) Render(storage *ecs.Storage)
type EntityInfo ¶
type FrameTimer ¶
type FrameTimer struct {
// contains filtered or unexported fields
}
func NewFrameTimer ¶
func NewFrameTimer() *FrameTimer
func (*FrameTimer) GetDeltaTime ¶
func (ft *FrameTimer) GetDeltaTime() float32
type ImguiInputState ¶
ImguiInputState tracks Dear ImGui's input capture state as a singleton component. Use this to determine if ImGui is consuming mouse or keyboard input.
type ImguiItem ¶
type ImguiItem struct {
Render func()
}
ImguiItem is a component that holds a Dear ImGui render function. Attach this to entities that should render ImGui widgets each frame.
type ImguiSystem ¶
type ImguiSystem struct {
Items ecs.Query[struct{ *ImguiItem }]
InputState ecs.Singleton[ImguiInputState]
EntityBrowsers ecs.Query[struct{ *EntityBrowserComponent }]
ComponentInspectors ecs.Query[struct{ *ComponentInspectorComponent }]
ArchetypeViewers ecs.Query[struct{ *ArchetypeViewerComponent }]
PerformanceStats ecs.Query[struct{ *PerformanceStatsComponent }]
QueryDebuggers ecs.Query[struct{ *QueryDebuggerComponent }]
FrameTimer ecs.Singleton[FrameTimer]
}
ImguiSystem queries all ImguiItem components and defers their render functions. It also updates the ImguiInputState singleton with current input capture state.
func (*ImguiSystem) Execute ¶
func (i *ImguiSystem) Execute(frame *ecs.UpdateFrame)
Execute updates input state and queues all ImGui render functions for execution.
type PerformanceStatsComponent ¶
type PerformanceStatsComponent struct {
// contains filtered or unexported fields
}
func NewPerformanceStatsComponent ¶
func NewPerformanceStatsComponent(historyFrames int) PerformanceStatsComponent
type QueryDebuggerCache ¶
type QueryDebuggerCache struct {
// contains filtered or unexported fields
}
type QueryDebuggerComponent ¶
type QueryDebuggerComponent struct {
// contains filtered or unexported fields
}
func NewQueryDebuggerComponent ¶
func NewQueryDebuggerComponent() QueryDebuggerComponent
func (*QueryDebuggerComponent) Render ¶
func (qd *QueryDebuggerComponent) Render(storage *ecs.Storage)
type ReflectionCache ¶
type ReflectionCache struct {
// contains filtered or unexported fields
}
func NewReflectionCache ¶
func NewReflectionCache() *ReflectionCache