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
Afficher le fichier Open project: aienabled/NoesisGUI.MonoGameWrapper Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

public DeviceLostHandler ( object sender, System.EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Résultat void

MonoGameNoesisGUIWrapper() public méthode

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
Résultat Microsoft.Xna.Framework

PostRender() public méthode

public PostRender ( ) : void
Résultat void

PreRender() public méthode

public PreRender ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void

Update() public méthode

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Résultat void