Exemple #1
0
        /*####################################################################*/
        /*                           Initialization                           */
        /*####################################################################*/
        public Gui(Game game, Skin defaultSkin, Text defaultText,
            IEnumerable<Tuple<string, Skin>> skins = null, 
            IEnumerable<Tuple<string, Text>> textRenderers = null)
        {
            InitDom();

            NewState = OldState = new MouseState();

            InputManager = new InputManager(Dom);
            RenderManager = new RenderManager(game.GraphicsDevice);

            SetDefaultSettings(game, defaultSkin, defaultText);

            if (skins != null) {
                foreach (var skin in skins) {
                    AddSkin(skin.Item1, skin.Item2);
                }
            }

            if (textRenderers != null) {
                foreach (var textRenderer in textRenderers) {
                    AddText(textRenderer.Item1, textRenderer.Item2);
                }
            }
        }
Exemple #2
0
 public void Draw()
 {
     RenderManager.Draw(Dom);
 }
Exemple #3
0
 public void AddText(string name, Text renderer)
 {
     RenderManager.AddText(name, renderer);
 }
Exemple #4
0
 public void AddSkin(string name, Skin skin)
 {
     RenderManager.AddSkin(name, skin);
 }
 public void SetRenderManager(RenderManager manager)
 {
     RenderManager = manager;
 }