예제 #1
0
        public ModsMenu(Manager manager, IModManager modManager)
            : base(manager)
        {
            this.Init();
            this.Width  = this.Manager.ScreenWidth;
            this.Height = this.Manager.ScreenHeight;
            this.Color  = Color.Transparent;
            GnomanEmpire.Instance.GuiManager.Add(this);
            GnomanEmpire.Instance.Graphics.DeviceReset += (sender, args) =>
            {
                Width  = manager.ScreenWidth;
                Height = manager.ScreenHeight;

                SetPosition();
            };
            _raisedPanel = new RaisedPanel(manager);
            _raisedPanel.Init();
            Add(_raisedPanel);
            AboutModsPanel aboutModsPanel = new AboutModsPanel(_raisedPanel, modManager);

            Button button = new Button(this.Manager);

            button.Init();
            button.Width  = 100;
            button.Left   = button.Margins.Left;
            button.Top    = aboutModsPanel.ModListBox.Top + aboutModsPanel.ModListBox.Height + aboutModsPanel.ModListBox.Margins.Bottom + button.Margins.Top;
            button.Text   = "Back";
            button.Click += (sender, args) => GnomanEmpire.Instance.GuiManager.MenuStack.PopWindow();
            this._raisedPanel.Add(button);

            this._raisedPanel.Width  = aboutModsPanel.ModInfoPanel.Left + aboutModsPanel.ModInfoPanel.Width + this._raisedPanel.ClientMargins.Horizontal + aboutModsPanel.ModListBox.Margins.Right;
            this._raisedPanel.Height = button.Top + button.Height + button.Margins.Bottom + this._raisedPanel.ClientMargins.Vertical;
            SetPosition();
        }
예제 #2
0
 public override void SetupPanel()
 {
     _aboutModsPanel = new AboutModsPanel(this, _modManager, this.Height, this.Width);
 }
예제 #3
0
        public ModsMenu(Manager manager, IModManager modManager)
            : base(manager)
        {
            this.Init();
            this.Width = this.Manager.ScreenWidth;
            this.Height = this.Manager.ScreenHeight;
            this.Color = Color.Transparent;
            GnomanEmpire.Instance.GuiManager.Add(this);
            GnomanEmpire.Instance.Graphics.DeviceReset += (sender, args) =>
            {
                Width = manager.ScreenWidth;
                Height = manager.ScreenHeight;

                SetPosition();
            };
            _raisedPanel = new RaisedPanel(manager);
            _raisedPanel.Init();
            Add(_raisedPanel);
            AboutModsPanel aboutModsPanel = new AboutModsPanel(_raisedPanel, modManager);

            Button button = new Button(this.Manager);
            button.Init();
            button.Width = 100;
            button.Left = button.Margins.Left;
            button.Top = aboutModsPanel.ModListBox.Top + aboutModsPanel.ModListBox.Height + aboutModsPanel.ModListBox.Margins.Bottom + button.Margins.Top;
            button.Text = "Back";
            button.Click += (sender, args) => GnomanEmpire.Instance.GuiManager.MenuStack.PopWindow();
            this._raisedPanel.Add(button);

            this._raisedPanel.Width = aboutModsPanel.ModInfoPanel.Left + aboutModsPanel.ModInfoPanel.Width + this._raisedPanel.ClientMargins.Horizontal + aboutModsPanel.ModListBox.Margins.Right;
            this._raisedPanel.Height = button.Top + button.Height + button.Margins.Bottom + this._raisedPanel.ClientMargins.Vertical;
            SetPosition();
        }
예제 #4
0
 public override void SetupPanel()
 {
     _aboutModsPanel = new AboutModsPanel(this, _modManager, this.Height, this.Width);
 }