Skip to content

Instantly share code, notes, and snippets.

@kingcoyote
Created August 22, 2013 17:16
Show Gist options
  • Save kingcoyote/6310134 to your computer and use it in GitHub Desktop.
Save kingcoyote/6310134 to your computer and use it in GitHub Desktop.
Gui = new GuiManager(Game.Graphics, Game.Input)
{
Screen = new Screen(game.GraphicsDevice.Viewport.Width, game.GraphicsDevice.Viewport.Height)
};
Gui.Screen.Desktop.Bounds = new UniRectangle(
25, 25,
new UniScalar(1.0f, -25.0F), new UniScalar(1.0f, -25.0F)
);
Gui.Initialize();
Gui.Visualizer = FlatGuiVisualizer.FromFile(game.Services, "Content/menu_gui.xml");
// add the FlatImageButtonControlRenderer to the list of renderers
((FlatGuiVisualizer)Gui.Visualizer).RendererRepository.AddAssembly(typeof(FlatImageButtonControlRenderer).Assembly);
Gui.UpdateOrder = 1000;
Components = new GameComponentCollection { Gui };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment