public bool IsDown() { switch (MouseButton) { case null: return(PlayerInput.KeyDown(Key)); case 0: return(PlayerInput.LeftButtonHeld()); case 1: return(PlayerInput.RightButtonHeld()); case 2: return(PlayerInput.MidButtonHeld()); case 3: return(PlayerInput.Mouse4ButtonHeld()); case 4: return(PlayerInput.Mouse5ButtonHeld()); case 5: // No real way of "holding" a mouse wheel key, but then again it makes no sense to bind the key to this kind of task. return(PlayerInput.MouseWheelUpClicked()); case 6: return(PlayerInput.MouseWheelDownClicked()); } return(false); }
public bool IsDown() { switch (MouseButton) { case MouseButton.None: return(PlayerInput.KeyDown(Key)); case MouseButton.PrimaryMouse: return(PlayerInput.PrimaryMouseButtonHeld()); case MouseButton.SecondaryMouse: return(PlayerInput.SecondaryMouseButtonHeld()); case MouseButton.LeftMouse: return(PlayerInput.LeftButtonHeld()); case MouseButton.RightMouse: return(PlayerInput.RightButtonHeld()); case MouseButton.MiddleMouse: return(PlayerInput.MidButtonHeld()); case MouseButton.MouseButton4: return(PlayerInput.Mouse4ButtonHeld()); case MouseButton.MouseButton5: return(PlayerInput.Mouse5ButtonHeld()); case MouseButton.MouseWheelUp: // No real way of "holding" a mouse wheel key, but then again it makes no sense to bind the key to this kind of task. return(PlayerInput.MouseWheelUpClicked()); case MouseButton.MouseWheelDown: return(PlayerInput.MouseWheelDownClicked()); } return(false); }