Beyond_Beyaan.Screens.WindowInterface.MouseDown C# (CSharp) Метод

MouseDown() публичный Метод

public MouseDown ( int x, int y ) : bool
x int
y int
Результат bool
        public virtual bool MouseDown(int x, int y)
        {
            if (x >= _xPos && x < _xPos + _windowWidth && y >= _yPos && y < _yPos + _windowHeight)
            {
                if (_moveable)
                {
                    _moving = true;
                    _mouseX = x;
                    _mouseY = y;
                    _origX = _xPos;
                    _origY = _yPos;
                }
                return true;
            }
            return false;
        }

Usage Example

Пример #1
0
 public void MouseDown(int x, int y, int whichButton)
 {
     if (whichButton == 1)
     {
         if (_taskBar.MouseDown(x, y, whichButton))
         {
             return;
         }
         if (_windowShowing != null)
         {
             _windowShowing.MouseDown(x, y);
             return;
         }
         if (_gameMain.EmpireManager.CurrentEmpire.SelectedSystem != null)
         {
             if (_systemView.MouseDown(x, y))
             {
                 return;
             }
         }
         else if (_gameMain.EmpireManager.CurrentEmpire.SelectedFleetGroup != null)
         {
             if (_fleetView.MouseDown(x, y))
             {
                 return;
             }
         }
     }
 }