示例#1
0
文件: Input.cs 项目: Jimbo92/1915
 public bool ClickReleased(EClicks click)
 {
     switch (click)
     {
         case EClicks.LEFT: return CurrentMouse.LeftButton == ButtonState.Released & PreviousMouse.LeftButton == ButtonState.Pressed;
         case EClicks.MIDDLE: return CurrentMouse.MiddleButton == ButtonState.Released & PreviousMouse.MiddleButton == ButtonState.Pressed;
         case EClicks.RIGHT: return CurrentMouse.RightButton == ButtonState.Released & PreviousMouse.RightButton == ButtonState.Pressed;
     }
     return false;
 }
示例#2
0
文件: Input.cs 项目: Jimbo92/3042
        static public bool ClickPress(EClicks click)
        {
            switch (click)
            {
            case EClicks.LEFT: return(CurrentMouse.LeftButton == ButtonState.Pressed);

            case EClicks.MIDDLE: return(CurrentMouse.MiddleButton == ButtonState.Pressed);

            case EClicks.RIGHT: return(CurrentMouse.RightButton == ButtonState.Pressed);
            }
            return(false);
        }