BG2WindowPane.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. namespace COM3D2.MeidoPhotoStudio.Plugin
  2. {
  3. internal class BG2WindowPane : BaseWindowPane
  4. {
  5. private MeidoManager meidoManager;
  6. private PropsPane propsPane;
  7. private AttachPropPane attachPropPane;
  8. private MyRoomPropsPane myRoomPropsPane;
  9. private ModPropsPane modPropsPane;
  10. private SelectionGrid propTabs;
  11. private BasePane currentPropsPane;
  12. public BG2WindowPane(MeidoManager meidoManager, PropManager propManager)
  13. {
  14. this.meidoManager = meidoManager;
  15. this.propsPane = AddPane(new PropsPane(propManager));
  16. this.myRoomPropsPane = AddPane(new MyRoomPropsPane(propManager));
  17. this.modPropsPane = AddPane(new ModPropsPane(propManager));
  18. this.attachPropPane = AddPane(new AttachPropPane(this.meidoManager, propManager));
  19. this.propTabs = new SelectionGrid(Translation.GetArray("propTabs", new[] { "Props", "MyRoom", "Mod" }));
  20. this.propTabs.ControlEvent += (s, a) =>
  21. {
  22. currentPropsPane = this.Panes[this.propTabs.SelectedItemIndex];
  23. };
  24. this.currentPropsPane = this.Panes[0];
  25. }
  26. public override void Draw()
  27. {
  28. this.propTabs.Draw();
  29. MiscGUI.WhiteLine();
  30. this.currentPropsPane.Draw();
  31. if (this.propTabs.SelectedItemIndex == 0) this.attachPropPane.Draw();
  32. }
  33. public override void UpdatePanes()
  34. {
  35. if (ActiveWindow)
  36. {
  37. base.UpdatePanes();
  38. }
  39. }
  40. }
  41. }