IGM_Lobby.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using Microsoft.Xna.Framework;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. namespace OpenVIII
  6. {
  7. public partial class IGM_Lobby : Menu
  8. {
  9. #region Fields
  10. private Dictionary<Enum, Menu_Base> Data0;
  11. #endregion Fields
  12. #region Enums
  13. public enum SectionName
  14. {
  15. BG,
  16. Selections,
  17. }
  18. #endregion Enums
  19. #region Methods
  20. public static IGM_Lobby Create() => Create<IGM_Lobby>();
  21. public override bool Inputs() => Data[SectionName.Selections].Inputs();
  22. public override void StartDraw()
  23. {
  24. Matrix backupfocus = Focus;
  25. GenerateFocus(new Vector2(1280, 720), Box_Options.Top);
  26. base.StartDraw();
  27. Data0.Where(m => m.Value != null).ForEach(m => m.Value.Draw());
  28. base.EndDraw();
  29. Focus = backupfocus;
  30. base.StartDraw();
  31. }
  32. protected override void Init()
  33. {
  34. Size = new Vector2 { X = 840, Y = 630 };
  35. //Data0 is scaled from 1280x720
  36. Data0 = new Dictionary<Enum, Menu_Base> {
  37. { SectionName.BG, new IGMDataItem.Texture_Handler(TextureHandler.Create("start{0:00}", 2), new Rectangle(0,-25, 1280, 0)) } //new Rectangle(-45,-25, 1280+100, 0)
  38. };
  39. //Data is scaled from Size
  40. Data.TryAdd(SectionName.Selections, IGMData_Selections.Create());
  41. base.Init();
  42. }
  43. #endregion Methods
  44. }
  45. }