Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Microsoft.Xna.Framework;
- using Microsoft.Xna.Framework.Audio;
- using Microsoft.Xna.Framework.Content;
- using Microsoft.Xna.Framework.GamerServices;
- using Microsoft.Xna.Framework.Graphics;
- using Microsoft.Xna.Framework.Input;
- using Microsoft.Xna.Framework.Media;
- using Microsoft.Xna.Framework.Net;
- using Microsoft.Xna.Framework.Storage;
- using TomShane.Neoforce.Controls;
- namespace Lost_City_of_Chernobyl
- {
- public class CGuiManager : Microsoft.Xna.Framework.DrawableGameComponent
- {
- public static Manager manager { get; private set; }
- Window window;
- GraphicsDeviceManager graphics;
- public CGuiManager(Game game, GraphicsDeviceManager graphics)
- : base(game)
- {
- this.graphics = graphics;
- manager = new Manager(game, graphics, "Green");
- manager.SkinDirectory = @"content\skins\";
- CLog.Log(CLog.LOG_TYPE.L_INFO, manager.SkinDirectory);
- }
- public override void Initialize()
- {
- base.Initialize();
- manager.Initialize();
- window = new Window(manager);
- window.Init();
- window.Text = "best window ever to be seen";
- window.Top = 150; // this is in pixels, top-left is the origin
- window.Left = 250;
- window.Width = 350;
- window.Height = 350;
- manager.Add(window);
- }
- public override void Update(GameTime gameTime)
- {
- manager.Update(gameTime);
- base.Update(gameTime);
- }
- public override void Draw(GameTime gameTime)
- {
- base.Draw(gameTime);
- manager.Draw(gameTime);
- manager.EndDraw();
- }
- }
- }
Add Comment
Please, Sign In to add comment