Table of Contents

Class MonoGameIcyHost

Namespace
Icy.MonoGame.Configuration
Assembly
IcyUI.MonoGame.dll

IcyUI in a MonoGame game: a game component that pumps input, follows the display scale and draws Canvases every frame. Created by UseIcyUI(Game).

public sealed class MonoGameIcyHost : DrawableGameComponent, IGameComponent, IUpdateable, IDisposable, IDrawable, IIcyHost
Inheritance
GameComponent
DrawableGameComponent
MonoGameIcyHost
Implements
IGameComponent
IUpdateable
IDrawable
Inherited Members
DrawableGameComponent.GraphicsDevice
DrawableGameComponent.DrawOrder
DrawableGameComponent.Visible
DrawableGameComponent.DrawOrderChanged
DrawableGameComponent.VisibleChanged
GameComponent.Dispose()
GameComponent.Game
GameComponent.Enabled
GameComponent.UpdateOrder
GameComponent.EnabledChanged
GameComponent.UpdateOrderChanged
Extension Methods

Remarks

Components draw during base.Draw() in your game's Draw, and Microsoft.Xna.Framework.DrawableGameComponent.DrawOrder defaults to MaxValue, so the UI covers what your game and its other components draw. Anything you draw after base.Draw() lands on top of the UI.

Properties

Canvases

Gets the canvases drawn every frame, in order: a later canvas draws on top of an earlier one.

public IList<Canvas> Canvases { get; }

Property Value

IList<Canvas>

Configuration

Gets the configuration every element in this game is created with.

public IcyConfiguration Configuration { get; }

Property Value

IcyConfiguration

MainCanvas

Gets the canvas UseIcyUI() created, with input enabled; Canvases[0].

public Canvas MainCanvas { get; }

Property Value

Canvas

Methods

Draw(GameTime)

Draw this component.

public override void Draw(GameTime gameTime)

Parameters

gameTime GameTime

The time elapsed since the last call to Microsoft.Xna.Framework.DrawableGameComponent.Draw(Microsoft.Xna.Framework.GameTime).

Initialize()

Called when the Microsoft.Xna.Framework.GameComponent needs to be initialized.

public override void Initialize()

Update(GameTime)

Update the component.

public override void Update(GameTime gameTime)

Parameters

gameTime GameTime

Microsoft.Xna.Framework.GameTime of the Microsoft.Xna.Framework.GameComponent.Game.