C# Класс 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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CreateRenderer ( string rootXamlPath, string stylePath ) : UIRenderer
DeviceResetHandler ( object sender, System.EventArgs e ) : void
UpdateSize ( ) : void
WindowClientSizeChangedHandler ( object sender, System.EventArgs e ) : void

Описание методов

DeviceLostHandler() публичный Метод

public DeviceLostHandler ( object sender, System.EventArgs eventArgs ) : void
sender object
eventArgs System.EventArgs
Результат void

MonoGameNoesisGUIWrapper() публичный Метод

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
Результат Microsoft.Xna.Framework

PostRender() публичный Метод

public PostRender ( ) : void
Результат void

PreRender() публичный Метод

public PreRender ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void

Update() публичный Метод

public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void