Guest User

Untitled

a guest
Aug 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using Microsoft.Xna.Framework;
  5. using Microsoft.Xna.Framework.Audio;
  6. using Microsoft.Xna.Framework.Content;
  7. using Microsoft.Xna.Framework.GamerServices;
  8. using Microsoft.Xna.Framework.Graphics;
  9. using Microsoft.Xna.Framework.Input;
  10. using Microsoft.Xna.Framework.Media;
  11. using Microsoft.Xna.Framework.Net;
  12. using Microsoft.Xna.Framework.Storage;
  13. using TomShane.Neoforce.Controls;
  14.  
  15. namespace Lost_City_of_Chernobyl
  16. {
  17. public class CGuiManager : Microsoft.Xna.Framework.DrawableGameComponent
  18. {
  19. public static Manager manager { get; private set; }
  20. Window window;
  21. GraphicsDeviceManager graphics;
  22.  
  23. public CGuiManager(Game game, GraphicsDeviceManager graphics)
  24. : base(game)
  25. {
  26. this.graphics = graphics;
  27. manager = new Manager(game, graphics, "Green");
  28. manager.SkinDirectory = @"content\skins\";
  29. CLog.Log(CLog.LOG_TYPE.L_INFO, manager.SkinDirectory);
  30.  
  31. }
  32.  
  33. public override void Initialize()
  34. {
  35. base.Initialize();
  36.  
  37. manager.Initialize();
  38.  
  39.  
  40. window = new Window(manager);
  41. window.Init();
  42. window.Text = "best window ever to be seen";
  43. window.Top = 150; // this is in pixels, top-left is the origin
  44. window.Left = 250;
  45. window.Width = 350;
  46. window.Height = 350;
  47. manager.Add(window);
  48.  
  49. }
  50.  
  51. public override void Update(GameTime gameTime)
  52. {
  53. manager.Update(gameTime);
  54.  
  55. base.Update(gameTime);
  56. }
  57.  
  58. public override void Draw(GameTime gameTime)
  59. {
  60. base.Draw(gameTime);
  61. manager.Draw(gameTime);
  62.  
  63. manager.EndDraw();
  64. }
  65. }
  66. }
Add Comment
Please, Sign In to add comment