public void linkBindButtonToInput(InputEvent input, SimpleUri bindId) { if (input instanceof KeyEvent) { linkBindButtonToKey(((KeyEvent) input).getKey().getId(), bindId); } else if (input instanceof MouseButtonEvent) { linkBindButtonToMouse(((MouseButtonEvent) input).getButton(), bindId); } else if (input instanceof MouseWheelEvent) { linkBindButtonToMouseWheel(((MouseWheelEvent) input).getWheelTurns(), bindId); } }
public void linkBindButtonToInput(Input input, SimpleUri bindId) { switch (input.getType()) { case KEY: linkBindButtonToKey(input.getId(), bindId); break; case MOUSE_BUTTON: MouseInput button = MouseInput.find(input.getType(), input.getId()); linkBindButtonToMouse(button, bindId); break; case MOUSE_WHEEL: linkBindButtonToMouseWheel(input.getId(), bindId); break; default: break; } }