Class Game
A MonoGame Microsoft.Xna.Framework.Game instance that runs SadConsole.
Implements
Inherited Members
Namespace: SadConsole.Host
Assembly: SadConsole.Host.MonoGame.dll
Syntax
public class Game : Game, IDisposable
Fields
ClearScreenComponent
The game component that clears the render output before each frame draw.
Declaration
public Game.ClearScreenGameComponent ClearScreenComponent
Field Value
Type | Description |
---|---|
Game.ClearScreenGameComponent |
SadConsoleComponent
The game component to control SadConsole updates, input, and rendering.
Declaration
public Game.SadConsoleGameComponent SadConsoleComponent
Field Value
Type | Description |
---|---|
Game.SadConsoleGameComponent |
Properties
WindowHeight
The current game window height.
Declaration
public int WindowHeight { get; }
Property Value
Type | Description |
---|---|
int |
WindowWidth
The current game window width.
Declaration
public int WindowWidth { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Initialize()
Declaration
protected override void Initialize()
Overrides
RecreateRenderOutput(int, int)
Regenerates the RenderOutput if the desired size doesn't match the current size.
Declaration
protected virtual void RecreateRenderOutput(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | The width of the render output. |
int | height | The height of the render output. |
ResetRendering()
Resets the RenderOutput target and determines the appropriate RenderRect and RenderScale based on the window or fullscreen state.
Declaration
public virtual void ResetRendering()
ResizeGraphicsDeviceManager(Point, int, int, int, int)
Resizes the GraphicsDeviceManager by the specified font size.
Declaration
public void ResizeGraphicsDeviceManager(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. |
Events
WindowResized
Raised when the window is resized and the render area has been calculated.
Declaration
public event EventHandler WindowResized
Event Type
Type | Description |
---|---|
EventHandler |