Exemple #1
0
 public override bool MouseDown(int x, int y)
 {
     if (!_colonizing)
     {
         for (int i = 0; i < _maxShips; i++)
         {
             _shipButtons[i].MouseDown(x, y);
         }
         _cancelButton.MouseDown(x, y);
         _colonizeButton.MouseDown(x, y);
     }
     else if (_showingText)
     {
         _nameTextBox.MouseDown(x, y);
     }
     return(false);
 }
Exemple #2
0
 public void MouseDown(int x, int y, int whichButton)
 {
     if (whichButton != 1)
     {
         return;
     }
     if (_generatingGalaxy)
     {
         return;
     }
     if (_showingSelection)
     {
         _raceSelection.MouseDown(x, y);
         return;
     }
     if (_playerRaceDescription.MouseDown(x, y))
     {
         return;
     }
     if (_galaxyComboBox.MouseDown(x, y))
     {
         return;
     }
     if (_difficultyComboBox.MouseDown(x, y))
     {
         return;
     }
     if (_playerEmperorName.MouseDown(x, y))
     {
         return;
     }
     if (_playerHomeworldName.MouseDown(x, y))
     {
         return;
     }
     if (_playerRaceButton.MouseDown(x, y))
     {
         return;
     }
     for (int i = 0; i < _numericUpDownAI.Value; i++)
     {
         if (_AIRaceButtons[i].MouseDown(x, y))
         {
             return;
         }
     }
     if (_okButton.MouseDown(x, y))
     {
         return;
     }
     if (_cancelButton.MouseDown(x, y))
     {
         return;
     }
     _numericUpDownAI.MouseDown(x, y);
 }
        public override bool MouseDown(int x, int y)
        {
            if (_promptShowing)
            {
                return(_saveGameNameField.MouseDown(x, y));
            }
            bool result = _scrollBar.MouseDown(x, y);

            for (int i = 0; i < _buttons.Length; i++)
            {
                result = _buttons[i].MouseDown(x, y) || result;
            }
            for (int i = 0; i < _maxVisible; i++)
            {
                result = _saveGameButtons[i].MouseDown(x, y) || result;
            }
            return(base.MouseDown(x, y) || result);
        }
Exemple #4
0
        public override bool MouseDown(int x, int y)
        {
            if (!_isOwnedSystem)
            {
                return(base.MouseDown(x, y));
            }
            bool result;

            if (IsTransferring)
            {
                result = _popTransferSlider.MouseDown(x, y);
                if (!result)
                {
                    result = _transferToButton.MouseDown(x, y);
                }
                if (!result)
                {
                    result = base.MouseDown(x, y);
                }
                return(result);
            }
            if (IsRelocating)
            {
                if (_relocateToButton.MouseDown(x, y))
                {
                    return(true);
                }
                return(base.MouseDown(x, y));
            }
            result = _name.MouseDown(x, y);
            if (!result)
            {
                result = _infrastructureSlider.MouseDown(x, y);
            }
            if (!result)
            {
                result = _researchSlider.MouseDown(x, y);
            }
            if (!result)
            {
                result = _environmentSlider.MouseDown(x, y);
            }
            if (!result)
            {
                result = _defenseSlider.MouseDown(x, y);
            }
            if (!result)
            {
                result = _constructionSlider.MouseDown(x, y);
            }
            if (!result)
            {
                result = _infrastructureLockButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _researchLockButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _environmentLockButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _defenseLockButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _constructionLockButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _relocateToButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _transferToButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = _constructionProjectButton.MouseDown(x, y);
            }
            if (!result)
            {
                result = base.MouseDown(x, y);
            }
            return(result);
        }