Example #1
0
 /// <summary>
 /// Finds out if a button on the Mouse has been stroked.
 /// </summary>
 /// <param name="button">The button to check.</param>
 /// <returns>The result of the check.</returns>
 public static bool IsButtonStroked(MouseBtns button)
 {
     if (mouse != null)
     {
         return(mouse.IsButtonStroked(button));
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 /// <summary>
 /// A check to see if a mouse button has been stroked.
 /// </summary>
 /// <param name="button">The button to check.</param>
 /// <returns>The result of the check.</returns>
 public bool IsButtonStroked(MouseBtns button)
 {
     if (IsButtonReleased(button, prevState) && IsButtonPressed(button, currentState))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #3
0
        public Entry(CmdTypes cmdType, string keys, int period, MouseBtns btn, bool repeat, string seperator)
        {
            Id = Counter;
            Counter++;
            this.CmdType = cmdType;
            this.Keys    = keys;

            this.MouseBtn  = btn;
            this.Repeat    = repeat;
            this.Seperator = seperator;
        }
Example #4
0
 ButtonState GetBtnState(MouseBtns btn, MouseState state)
 {
     if (btn == MouseBtns.Left)
     {
         return(state.LeftButton);
     }
     else if (btn == MouseBtns.Right)
     {
         return(state.RightButton);
     }
     else if (btn == MouseBtns.Middle)
     {
         return(state.MiddleButton);
     }
     else if (btn == MouseBtns.Alt1)
     {
         return(state.XButton1);
     }
     else
     {
         return(state.XButton2);
     }
 }
Example #5
0
 bool IsButtonReleased(MouseBtns button, MouseState state)
 {
     return(GetBtnState(button, state) == ButtonState.Released ? true : false);
 }
Example #6
0
 /// <summary>
 /// A check to see if a mouse button has being released.
 /// </summary>
 /// <param name="button">The button to check.</param>
 /// <returns>The result of the check.</returns>
 public bool IsButtonReleased(MouseBtns button)
 {
     return(GetBtnState(button, currentState) == ButtonState.Released ? true : false);
 }
Example #7
0
 public Entry(MouseBtns btn) : this(CmdTypes.MouseClick, null, 0, btn, false, null)
 {
 }