Class Global
Global variables used by the MonoGame host.
Inherited Members
Namespace: SadConsole.Host
Assembly: SadConsole.Host.MonoGame.dll
Syntax
public static class Global
Properties
BlockSadConsoleInput
When true, prevents the keyboard and mouse logic from running.
Declaration
public static bool BlockSadConsoleInput { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
GraphicsDevice
The graphics device created by MonoGame.
Declaration
public static GraphicsDevice GraphicsDevice { get; set; }
Property Value
| Type | Description |
|---|---|
| GraphicsDevice |
GraphicsDeviceManager
The graphics device manager created by MonoGame.
Declaration
public static GraphicsDeviceManager GraphicsDeviceManager { get; set; }
Property Value
| Type | Description |
|---|---|
| GraphicsDeviceManager |
RecreateRenderOutput
Regenerates the RenderOutput if the desired size doesn't match the current size.
Declaration
public static Global.RecreateRenderOutputDelegate RecreateRenderOutput { get; set; }
Property Value
| Type | Description |
|---|---|
| Global.RecreateRenderOutputDelegate |
RenderLoopGameTime
Reference to the game timer used in the MonoGame render loop.
Declaration
public static GameTime RenderLoopGameTime { get; }
Property Value
| Type | Description |
|---|---|
| GameTime |
RenderOutput
The output texture. After each screen in SadConsole is drawn, they're then drawn on this output texture to compose the final scene.
Declaration
public static RenderTarget2D RenderOutput { get; set; }
Property Value
| Type | Description |
|---|---|
| RenderTarget2D |
ResetRendering
Resets the RenderOutput target and determines the appropriate RenderRect and RenderScale based on the window or fullscreen state.
Declaration
public static Action ResetRendering { get; set; }
Property Value
| Type | Description |
|---|---|
| Action |
ResizeGraphicsDeviceManager
Resizes the GraphicsDeviceManager by the specified font size.
Declaration
public static Global.ResizeGraphicsDeviceManagerDelegate ResizeGraphicsDeviceManager { get; set; }
Property Value
| Type | Description |
|---|---|
| Global.ResizeGraphicsDeviceManagerDelegate |
SadConsoleComponent
The game component to control SadConsole updates, input, and rendering.
Declaration
public static SadConsoleGameComponent SadConsoleComponent { get; set; }
Property Value
| Type | Description |
|---|---|
| SadConsoleGameComponent |
SharedSpriteBatch
A sprite batch used by all of SadConsole to render objects.
Declaration
public static SpriteBatch SharedSpriteBatch { get; set; }
Property Value
| Type | Description |
|---|---|
| SpriteBatch |
UpdateLoopGameTime
Reference to the game timer used in the MonoGame update loop.
Declaration
public static GameTime UpdateLoopGameTime { get; }
Property Value
| Type | Description |
|---|---|
| GameTime |
Methods
RecreateRenderOutputHandler(int, int)
Regenerates the RenderOutput if the desired size doesn't match the current size.
Declaration
public static void RecreateRenderOutputHandler(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the render output. |
| int | height | The height of the render output. |
ResetGraphicsDevice()
Sets the GraphicsDevice render target to null, targeting the app window.
Declaration
public static void ResetGraphicsDevice()
ResetRenderingHandler()
Resets the RenderOutput target and determines the appropriate RenderRect and RenderScale based on the window or fullscreen state.
Declaration
public static void ResetRenderingHandler()
ResizeGraphicsDeviceManagerHandler(Point, int, int, int, int)
Resizes the GraphicsDeviceManager by the specified font size.
Declaration
public static void ResizeGraphicsDeviceManagerHandler(Point fontSize, int width, int height, int additionalWidth, int additionalHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| Point | fontSize | The size of the font to base the final values on. |
| int | width | The count of glyphs along the X-axis. |
| int | height | The count of glyphs along the Y-axis. |
| int | additionalWidth | Additional pixel width to add to the resize. |
| int | additionalHeight | Additional pixel height to add to the resize. |