-
Notifications
You must be signed in to change notification settings - Fork 6
Getting Started
MonogameUI will probably be available on NuGet, until then you will have to compile it yourself and include the DLL everywhere you need it
To display any Screens you will need a ScreenManager. It will take care of Navigation and provide a basic Frame in which our Pages get rendered.
First create a new Class and make it inherit from "BaseScreenComponent". Create the basic Constructor and override the Method LoadContent(). This Method gets called when your ScreenManager initializes and allows you to e.g. set Animations, Skins or navigate to the first Screen. For now the following will suffice:
public class ScreenComponent : BaseScreenComponent
{
public ScreenComponent(Game game) : base(game){}
protected override void LoadContent()
{
base.LoadContent();
Frame.Background = new BorderBrush(Color.CornflowerBlue); //Here we set a Background Color.
}
}
To display any Controls you will need a Screen on which they are positioned. All Controls will be positioned relative to their parent. This means that Screens will be positioned relative to the Window, "First Level" Controls relative to the Screen and so on.
To create your first Screen create a class which inherits from the MonogameUI "Screen" class. The base Constructor takes one Argument: an IScreenManager Object.
public class MyScreen : Screen
{
public MyScreen(IScreenManager manager) : base(manager) {}
}
This Framework is in early Development, things might change!