C# Class NoesisGUI.MonoGameWrapper.MonoGameNoesisGUIWrapper

Wrapper usage: 1. at game Initialize() create wrapper instance (see this class constructor) 2. at game Update() invoke wrapper.Update(gameTime) 3. at game Draw() invoke: - 3.1. wrapper.PreRender(gameTime) - 3.2. clear graphics device (including stencil buffer) - 3.3. your game drawing code - 3.4. wrapper.PostRender() Please be sure you have IsMouseVisible=true at the MonoGame instance
Mostrar archivo Open project: aienabled/NoesisGUI.MonoGameWrapper Class Usage Examples

Public Methods

Method Description
DeviceLostHandler ( object sender, System.EventArgs eventArgs ) : void
MonoGameNoesisGUIWrapper ( Microsoft.Xna.Framework.Game game, GraphicsDeviceManager graphics, string rootXamlPath, string stylePath = null, string dataLocalPath = "Data" ) : Microsoft.Xna.Framework

Initializes a new instance of the MonoGameNoesisGUIWrapper class.

PLEASE NOTE: .XAML-files should be prebuilt to .NSB-files by NoesisGUI Build Tool).

PostRender ( ) : void
PreRender ( GameTime gameTime ) : void
Update ( GameTime gameTime ) : void

Private Methods

Method Description
CreateRenderer ( string rootXamlPath, string stylePath ) : UIRenderer
DeviceResetHandler ( object sender, System.EventArgs e ) : void
UpdateSize ( ) : void
WindowClientSizeChangedHandler ( object sender, System.EventArgs e ) : void

Method Details

DeviceLostHandler() public method

public DeviceLostHandler ( object sender, System.EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
return void

MonoGameNoesisGUIWrapper() public method

Initializes a new instance of the MonoGameNoesisGUIWrapper class.
PLEASE NOTE: .XAML-files should be prebuilt to .NSB-files by NoesisGUI Build Tool).
public MonoGameNoesisGUIWrapper ( Microsoft.Xna.Framework.Game game, GraphicsDeviceManager graphics, string rootXamlPath, string stylePath = null, string dataLocalPath = "Data" ) : Microsoft.Xna.Framework
game Microsoft.Xna.Framework.Game The MonoGame game instance.
graphics GraphicsDeviceManager Graphics device manager of the game instance.
rootXamlPath string Local XAML file path - will be used as the UI root element
stylePath string (optional) Local XAML file path - will be used as global ResourceDictionary (UI style)
dataLocalPath string (optional) Local path to the folder which will be used as root for other paths
return Microsoft.Xna.Framework

PostRender() public method

public PostRender ( ) : void
return void

PreRender() public method

public PreRender ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Update() public method

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void