public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); if (currentState == null || previousState == null || !currentState.getMouseState().hasButtonState(ButtonState.DOWN)) { return false; } return currentState.getMouseState().getButtonsPressedSince(previousState.getMouseState()).contains(_button); } }
public boolean apply(final TwoInputStates states) { final InputState currentState = states.getCurrent(); final InputState previousState = states.getPrevious(); if (currentState == null || previousState == null || !currentState.getMouseState().hasButtonState(ButtonState.DOWN)) { return false; } return currentState.getMouseState().getButtonsPressedSince(previousState.getMouseState()).contains(_button); } }
if (mouseState.getButtonsPressedSince(previousState.getMouseState()).contains(_button)) { _armed = true; _armedX = mouseState.getX(); if (mouseState.getButtonsPressedSince(previousState.getMouseState()).size() > 0) { _armed = false; return false;
else if (!current.getButtonsPressedSince(previous).contains(_dragButton) && !_dragging) { return false;
final EnumSet<MouseButton> pressed = currentMState.getButtonsPressedSince(previousMState); if (!pressed.isEmpty()) { for (final MouseButton button : pressed) {
final EnumSet<MouseButton> pressed = currentMState.getButtonsPressedSince(previousMState); if (!pressed.isEmpty()) { for (final MouseButton button : pressed) {