src/main/java/com/spinyowl/legui/component/misc/listener/button/UpdateButtonStyleWidthListener.java
@Override
  public void process(ButtonWidthChangeEvent event) {
    Button button = event.getTargetComponent();
    float textWidth = button.getTextState().getTextWidth();
    button.getStyle().setWidth(textWidth);
  }
/**
   * Used to handle {@link ButtonContentChangeEvent} event.
   *
   * @param event event to handle.
   */
Used to handle  ButtonContentChangeEvent event.
@param event event to handle.
Used to handle ButtonContentChangeEvent event . @param event event to handle .
@Override
  public void process(ButtonWidthChangeEvent event) {
    Button button = event.getTargetComponent();
    float textWidth = button.getTextState().getTextWidth();
    button.getStyle().setWidth(textWidth);
  }
@ Override public void process ( ButtonWidthChangeEvent event ) { Button button = event . getTargetComponent ( ) ; float textWidth = button . getTextState ( ) . getTextWidth ( ) ; button . getStyle ( ) . setWidth ( textWidth ) ; }
Used to handle {@link ButtonContentChangeEvent} event.
Used to handle { @link ButtonContentChangeEvent } event .