Interface IGuiContext
Assembly: Ritchie.Toolbox.dll
Syntax
public interface IGuiContext
Properties
CanvasHeight
Declaration
int CanvasHeight { get; }
Property Value
CanvasWidth
Declaration
Property Value
Game
Declaration
Property Value
GraphicsDevice
Declaration
GraphicsDevice GraphicsDevice { get; }
Property Value
Type |
Description |
GraphicsDevice |
|
PhysicalHeight
Declaration
int PhysicalHeight { get; }
Property Value
PhysicalWidth
Declaration
int PhysicalWidth { get; }
Property Value
Methods
DrawElements(GuiSubMesh, int, int)
Declaration
void DrawElements(GuiSubMesh subMesh, int offset, int primitiveCount)
Parameters
GetFallbackFont()
Declaration
IFontFamily GetFallbackFont()
Returns
Grab(RenderTarget2D, Rectangle, Rectangle)
Renders the user interface to the given RenderTarget2D. Useful for certain widget rendering techniques such as background blurs.
Declaration
void Grab(RenderTarget2D destination, Rectangle sourceArea, Rectangle destinationArea)
Parameters
Type |
Name |
Description |
RenderTarget2D |
destination |
|
Rectangle |
sourceArea |
|
Rectangle |
destinationArea |
|
PrepareWidgetRender(VertexBuffer, LayoutRect?, IEffect?, float, Point)
Declaration
void PrepareWidgetRender(VertexBuffer vertices, LayoutRect? clipRect = null, IEffect? effectOverride = null, float opacity = 1, Point positionOffset = default)
Parameters
Type |
Name |
Description |
VertexBuffer |
vertices |
|
LayoutRect? |
clipRect |
|
IEffect |
effectOverride |
|
float |
opacity |
|
Point |
positionOffset |
|
Render(VertexPositionColorTexture[], int[], Texture2D?, LayoutRect?)
Declaration
void Render(VertexPositionColorTexture[] vertices, int[] indices, Texture2D? texture, LayoutRect? clipRect = null)
Parameters
Type |
Name |
Description |
VertexPositionColorTexture[] |
vertices |
|
int[] |
indices |
|
Texture2D |
texture |
|
LayoutRect? |
clipRect |
|
RestoreRenderState()
Declaration
void RestoreRenderState()