Skip to content

Class ImGuiHost

Namespace: Apogee.DevTools
Assembly: Apogee.DevTools.dll

A Dear ImGui context wired to the engine: SDL input, display size and the dark style. Draw widgets between and ; then puts the result on the screen.

public sealed class ImGuiHost : IDisposable

Inheritance

object ← ImGuiHost

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Constructors

ImGuiHost()

public ImGuiHost()

Properties

Context

public ImGuiContext* Context { get; }

Property Value

ImGuiContext*

IO

public ImGuiIO* IO { get; }

Property Value

ImGuiIO*

WantsKeyboard

True while ImGui wants the keyboard (a text field is active).

public bool WantsKeyboard { get; }

Property Value

bool

WantsMouse

True while ImGui wants the mouse (the pointer is over a widget): the game should not also react to clicks.

public bool WantsMouse { get; }

Property Value

bool

Methods

Attach(Window)

Sends this window's input to ImGui and sizes the display from it.

public void Attach(Window window)

Parameters

window Window

AttachToAllWindows()

Takes input from every window instead of one: for tools and tests that have no window of their own.

public void AttachToAllWindows()

BeginFrame(float)

Starts a frame sized to the attached window.

public void BeginFrame(float deltaSeconds)

Parameters

deltaSeconds float

BeginFrame(float, float, float, float)

Starts a frame with an explicit display size in points and the pixels-per-point scale (headless use, tests).

public void BeginFrame(float width, float height, float scale, float deltaSeconds)

Parameters

width float

height float

scale float

deltaSeconds float

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

EnableDocking()

Lets windows dock into each other and into a dockspace (). It is off by default: the dev overlay's windows float. Windows stay inside the one OS window; ImGui's multi-viewport is not enabled.

public void EnableDocking()

EndFrame()

Finishes the frame's widgets and produces the draw data the renderer draws.

public void EndFrame()