Show / Hide Table of Contents

Class ImGuiRenderer

Inheritance
object
ImGuiRenderer
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadConsole.ImGuiSystem
Assembly: SadConsole.Debug.MonoGame.dll
Syntax
public class ImGuiRenderer

Properties

HideRequested

When true, indicates thats the UI should be hidden and stopped. Once it's hidden and stopped, this property is set to false.

Declaration
public bool HideRequested { get; set; }
Property Value
Type Description
bool

WantsKeyboardCapture

When true, indicates thats the ImGui input system is going to use the mouse, for example when focus is on a textbox; otherwise false.

Declaration
public bool WantsKeyboardCapture { get; }
Property Value
Type Description
bool

WantsMouseCapture

When true, indicates thats the ImGui input system is going to use the mouse, for example when the mouse is over a UI element; otherwise false.

Declaration
public bool WantsMouseCapture { get; }
Property Value
Type Description
bool

Methods

AddFontTTF(string, float)

Declaration
public ImFontPtr AddFontTTF(string file, float size)
Parameters
Type Name Description
string file
float size
Returns
Type Description
ImFontPtr

AfterLayout()

Asks ImGui for the generated geometry data and sends it to the graphics pipeline, should be called after the UI is drawn using ImGui.** calls

Declaration
public virtual void AfterLayout()

BeforeLayout(GameTime)

Sets up ImGui for a new frame, should be called at frame start

Declaration
public virtual void BeforeLayout(GameTime gameTime)
Parameters
Type Name Description
GameTime gameTime

BeforeLayoutInput(GameTime)

Runs the ImGui input. Call before BeforeLayout(GameTime).

Declaration
public void BeforeLayoutInput(GameTime gameTime)
Parameters
Type Name Description
GameTime gameTime

Game frame delta.

BindTexture(Texture2D)

Creates a pointer to a texture, which can be passed through ImGui calls such as Image(ImTextureID, Vector2, Vector2, Vector2, Vector4, Vector4). That pointer is then used by ImGui to let us know what texture to draw

Declaration
public virtual ImTextureID BindTexture(Texture2D texture)
Parameters
Type Name Description
Texture2D texture
Returns
Type Description
ImTextureID

GetBoundTexturePointer(Texture2D)

Declaration
public ImTextureID GetBoundTexturePointer(Texture2D texture)
Parameters
Type Name Description
Texture2D texture
Returns
Type Description
ImTextureID

HasBoundTexture(Texture2D)

Declaration
public bool HasBoundTexture(Texture2D texture)
Parameters
Type Name Description
Texture2D texture
Returns
Type Description
bool

RebuildFontAtlas()

Creates a texture and loads the font data from ImGui. Should be called when the Microsoft.Xna.Framework.Graphics.GraphicsDevice is initialized but before any rendering is done

Declaration
public virtual void RebuildFontAtlas()

ReplaceBoundTexture(ImTextureID, Texture2D)

Declaration
public void ReplaceBoundTexture(ImTextureID textureID, Texture2D texture)
Parameters
Type Name Description
ImTextureID textureID
Texture2D texture

SetDefaultFont(ImFontPtr)

Declaration
public void SetDefaultFont(ImFontPtr value)
Parameters
Type Name Description
ImFontPtr value

SetupInput()

Setup key input event handler.

Declaration
protected virtual void SetupInput()

UnbindTexture(ImTextureID)

Removes a previously created texture pointer, releasing its reference and allowing it to be deallocated

Declaration
public virtual void UnbindTexture(ImTextureID textureId)
Parameters
Type Name Description
ImTextureID textureId

UnbindTexture(Texture2D)

Removes a previously created texture pointer, releasing its reference and allowing it to be deallocated

Declaration
public virtual void UnbindTexture(Texture2D texture)
Parameters
Type Name Description
Texture2D texture

UpdateEffect(Texture2D)

Updates the Microsoft.Xna.Framework.Graphics.Effect to the current matrices and texture

Declaration
protected virtual Effect UpdateEffect(Texture2D texture)
Parameters
Type Name Description
Texture2D texture
Returns
Type Description
Effect

UpdateInput()

Sends XNA input state to ImGui

Declaration
protected virtual void UpdateInput()

Extension Methods

ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX