12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- namespace COM3D2.MeidoPhotoStudio.Plugin
- {
- internal class BG2WindowPane : BaseWindowPane
- {
- private MeidoManager meidoManager;
- private PropManager propManager;
- private PropsPane propsPane;
- private AttachPropPane attachPropPane;
- private MyRoomPropsPane myRoomPropsPane;
- private ModPropsPane modPropsPane;
- private SelectionGrid propTabs;
- private BasePane currentPropsPane;
- private static readonly string[] tabNames = { "props", "myRoom", "mod" };
- public BG2WindowPane(MeidoManager meidoManager, PropManager propManager)
- {
- this.meidoManager = meidoManager;
- this.propManager = propManager;
- this.propManager.DoguSelectChange += (s, a) => this.propTabs.SelectedItemIndex = 0;
- this.propsPane = AddPane(new PropsPane(propManager));
- this.myRoomPropsPane = AddPane(new MyRoomPropsPane(propManager));
- this.modPropsPane = AddPane(new ModPropsPane(propManager));
- this.attachPropPane = AddPane(new AttachPropPane(this.meidoManager, propManager));
- this.propTabs = new SelectionGrid(Translation.GetArray("propsPaneTabs", tabNames));
- this.propTabs.ControlEvent += (s, a) =>
- {
- currentPropsPane = this.Panes[this.propTabs.SelectedItemIndex];
- };
- this.currentPropsPane = this.Panes[0];
- }
- protected override void ReloadTranslation()
- {
- this.propTabs.SetItems(Translation.GetArray("propsPaneTabs", tabNames));
- }
- public override void Draw()
- {
- this.propTabs.Draw();
- MiscGUI.WhiteLine();
- this.currentPropsPane.Draw();
- if (this.propTabs.SelectedItemIndex == 0) this.attachPropPane.Draw();
- }
- public override void UpdatePanes()
- {
- if (ActiveWindow)
- {
- base.UpdatePanes();
- }
- }
- }
- }
|