Esempio n. 1
0
        public void Update(int x, int y, float frameDeltaTime)
        {
            if (_generatingGalaxy)
            {
                return;
            }
            if (_showingSelection)
            {
                _raceSelection.MouseHover(x, y, frameDeltaTime);
                return;
            }
            _playerEmperorName.Update(frameDeltaTime);
            _playerHomeworldName.Update(frameDeltaTime);
            _galaxyComboBox.MouseHover(x, y, frameDeltaTime);
            _difficultyComboBox.MouseHover(x, y, frameDeltaTime);
            _playerRaceButton.MouseHover(x, y, frameDeltaTime);

            for (int i = 0; i < _numericUpDownAI.Value; i++)
            {
                _AIRaceButtons[i].MouseHover(x, y, frameDeltaTime);
            }

            _numericUpDownAI.MouseHover(x, y, frameDeltaTime);
            _playerRaceDescription.MouseHover(x, y, frameDeltaTime);
            _okButton.MouseHover(x, y, frameDeltaTime);
            _cancelButton.MouseHover(x, y, frameDeltaTime);
        }
Esempio n. 2
0
        public override bool MouseHover(int x, int y, float frameDeltaTime)
        {
            int left = (_gameMain.ScreenWidth / 2) - 513;
            int top  = (_gameMain.ScreenHeight / 2) - 250;

            if (x >= left && x < left + 1010 && y >= top && y < top + 390)
            {
                //When hovering over a column, that entire row is highlighted
                for (int i = 0; i < _maxVisible; i++)
                {
                    _columnCells[0][i].MouseHover(left + 1, y, frameDeltaTime);
                    _columnCells[1][i].MouseHover(left + 281, y, frameDeltaTime);
                    _columnCells[2][i].MouseHover(left + 371, y, frameDeltaTime);
                    _columnCells[3][i].MouseHover(left + 461, y, frameDeltaTime);
                    _columnCells[4][i].MouseHover(left + 541, y, frameDeltaTime);
                    _columnCells[5][i].MouseHover(left + 621, y, frameDeltaTime);
                    _columnCells[6][i].MouseHover(left + 701, y, frameDeltaTime);
                    _columnCells[7][i].MouseHover(left + 951, y, frameDeltaTime);
                }
            }
            if (_reserveSlider.MouseHover(x, y, frameDeltaTime))
            {
                _gameMain.EmpireManager.CurrentEmpire.TaxRate = _reserveSlider.TopIndex;
                RefreshReserves();
                return(true);
            }
            if (_transferSlider.MouseHover(x, y, frameDeltaTime))
            {
                RefreshTransfer();
                return(true);
            }
            _transferReserves.MouseHover(x, y, frameDeltaTime);
            return(base.MouseHover(x, y, frameDeltaTime));
        }
Esempio n. 3
0
 public override bool MouseHover(int x, int y, float frameDeltaTime)
 {
     _okButton.MouseHover(x, y, frameDeltaTime);
     _raceDescription.MouseHover(x, y, frameDeltaTime);
     for (int i = 0; i < _maxVisible; i++)
     {
         _raceButtons[i].MouseHover(x, y, frameDeltaTime);
     }
     return(base.MouseHover(x, y, frameDeltaTime));
 }
Esempio n. 4
0
 public override bool MouseHover(int x, int y, float frameDeltaTime)
 {
     if (_fleetSpecsShowing)
     {
         return(_fleetSpecsWindow.MouseHover(x, y, frameDeltaTime));
     }
     for (int i = 0; i < _maxVisible; i++)
     {
         _planetBackgrounds[i].MouseHover(x, y, frameDeltaTime);
     }
     for (int i = 0; i < 6; i++)
     {
         _scrapButtons[i].MouseHover(x, y, frameDeltaTime);
     }
     _viewSpecsButton.MouseHover(x, y, frameDeltaTime);
     return(false);
 }
Esempio n. 5
0
 public override bool MouseHover(int x, int y, float frameDeltaTime)
 {
     if (!_isOwnedSystem)
     {
         return(base.MouseHover(x, y, frameDeltaTime));
     }
     if (IsTransferring)
     {
         if (_popTransferSlider.MouseHover(x, y, frameDeltaTime))
         {
             _transferLabel.SetText("Moving " + _popTransferSlider.TopIndex + " Population");
             return(true);
         }
         if (_transferToButton.MouseHover(x, y, frameDeltaTime))
         {
             return(true);
         }
         return(base.MouseHover(x, y, frameDeltaTime));
     }
     if (IsRelocating)
     {
         if (_relocateToButton.MouseHover(x, y, frameDeltaTime))
         {
             return(true);
         }
         return(base.MouseHover(x, y, frameDeltaTime));
     }
     _name.Update(frameDeltaTime);
     if (_infrastructureSlider.MouseHover(x, y, frameDeltaTime))
     {
         _currentSystem.Planets[0].SetOutputAmount(OUTPUT_TYPE.INFRASTRUCTURE, _infrastructureSlider.TopIndex, false);
         Refresh();
         return(true);
     }
     if (_researchSlider.MouseHover(x, y, frameDeltaTime))
     {
         _currentSystem.Planets[0].SetOutputAmount(OUTPUT_TYPE.RESEARCH, _researchSlider.TopIndex, false);
         Refresh();
         return(true);
     }
     if (_environmentSlider.MouseHover(x, y, frameDeltaTime))
     {
         _currentSystem.Planets[0].SetOutputAmount(OUTPUT_TYPE.ENVIRONMENT, _environmentSlider.TopIndex, false);
         Refresh();
         return(true);
     }
     if (_defenseSlider.MouseHover(x, y, frameDeltaTime))
     {
         _currentSystem.Planets[0].SetOutputAmount(OUTPUT_TYPE.DEFENSE, _defenseSlider.TopIndex, false);
         Refresh();
         return(true);
     }
     if (_constructionSlider.MouseHover(x, y, frameDeltaTime))
     {
         _currentSystem.Planets[0].SetOutputAmount(OUTPUT_TYPE.CONSTRUCTION, _constructionSlider.TopIndex, false);
         Refresh();
         return(true);
     }
     _infrastructureLockButton.MouseHover(x, y, frameDeltaTime);
     _researchLockButton.MouseHover(x, y, frameDeltaTime);
     _environmentLockButton.MouseHover(x, y, frameDeltaTime);
     _defenseLockButton.MouseHover(x, y, frameDeltaTime);
     _constructionLockButton.MouseHover(x, y, frameDeltaTime);
     _relocateToButton.MouseHover(x, y, frameDeltaTime);
     _transferToButton.MouseHover(x, y, frameDeltaTime);
     if (_constructionLockButton.MouseHover(x, y, frameDeltaTime))
     {
         return(true);
     }
     _constructionProjectButton.MouseHover(x, y, frameDeltaTime);
     return(base.MouseHover(x, y, frameDeltaTime));
 }