Class ImGuiRenderer
Inheritance
ImGuiRenderer
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
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
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
Methods
AddFontTTF(string, float)
Declaration
public ImFontPtr AddFontTTF(string file, float size)
Parameters
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 |
|
Declaration
public void BeforeLayoutInput(GameTime gameTime)
Parameters
| Type |
Name |
Description |
| GameTime |
gameTime |
Game frame delta.
|
BindTexture(Texture2D)
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
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 |
|
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
Sends XNA input state to ImGui
Declaration
protected virtual void UpdateInput()
Extension Methods