src/main/java/com/spinyowl/legui/component/misc/listener/component/TabKeyEventListener.java
@Override
  public void process(KeyEvent event) {
    if (event.getTargetComponent() == null) {
      return;
    }
    if (event.getKey() == GLFW.GLFW_KEY_TAB && event.getAction() != GLFW.GLFW_PRESS) {
      boolean controlPressed = (event.getMods() & GLFW.GLFW_MOD_CONTROL) != 0;
      boolean shiftPressed = (event.getMods() & GLFW.GLFW_MOD_SHIFT) != 0;
      if (controlPressed && !shiftPressed) {
        Component next = findNext(event.getTargetComponent());
        Context.setFocusedGui(next, event.getContext(), event.getFrame());
      } else if (controlPressed) {
        Component prev = findPrev(event.getTargetComponent());
        Context.setFocusedGui(prev, event.getContext(), event.getFrame());
      }
    }
  }
/**
   * Used to handle specific event.
   *
   * @param event event to handle.
   */
Used to handle specific event.
@param event event to handle.
Used to handle specific event . @param event event to handle .
@Override
  public void process(KeyEvent event) {
    if (event.getTargetComponent() == null) {
      return;
    }
    if (event.getKey() == GLFW.GLFW_KEY_TAB && event.getAction() != GLFW.GLFW_PRESS) {
      boolean controlPressed = (event.getMods() & GLFW.GLFW_MOD_CONTROL) != 0;
      boolean shiftPressed = (event.getMods() & GLFW.GLFW_MOD_SHIFT) != 0;
      if (controlPressed && !shiftPressed) {
        Component next = findNext(event.getTargetComponent());
        Context.setFocusedGui(next, event.getContext(), event.getFrame());
      } else if (controlPressed) {
        Component prev = findPrev(event.getTargetComponent());
        Context.setFocusedGui(prev, event.getContext(), event.getFrame());
      }
    }
  }
@ Override public void process ( KeyEvent event ) { if ( event . getTargetComponent ( ) == null ) { return ; } if ( event . getKey ( ) == GLFW . GLFW_KEY_TAB && event . getAction ( ) != GLFW . GLFW_PRESS ) { boolean controlPressed = ( event . getMods ( ) & GLFW . GLFW_MOD_CONTROL ) != 0 ; boolean shiftPressed = ( event . getMods ( ) & GLFW . GLFW_MOD_SHIFT ) != 0 ; if ( controlPressed && ! shiftPressed ) { Component next = findNext ( event . getTargetComponent ( ) ) ; Context . setFocusedGui ( next , event . getContext ( ) , event . getFrame ( ) ) ; } else if ( controlPressed ) { Component prev = findPrev ( event . getTargetComponent ( ) ) ; Context . setFocusedGui ( prev , event . getContext ( ) , event . getFrame ( ) ) ; } } }
Used to handle specific event.
Used to handle specific event .