java.lang.Object
meteordevelopment.meteorclient.gui.widgets.WWidget
meteordevelopment.meteorclient.gui.widgets.input.WTextBox
All Implemented Interfaces:
BaseWidget
Direct Known Subclasses:
WMeteorTextBox

public abstract class WTextBox extends WWidget
  • Field Details

    • action

      public Runnable action
    • actionOnUnfocused

      public Runnable actionOnUnfocused
    • text

      protected String text
    • placeholder

      protected String placeholder
    • filter

      protected CharFilter filter
    • renderer

      protected final WTextBox.Renderer renderer
    • focused

      protected boolean focused
    • textWidths

      protected it.unimi.dsi.fastutil.doubles.DoubleList textWidths
    • cursor

      protected int cursor
    • textStart

      protected double textStart
    • selecting

      protected boolean selecting
    • selectionStart

      protected int selectionStart
    • selectionEnd

      protected int selectionEnd
  • Constructor Details

  • Method Details

    • createCompletionsRootWidget

      protected abstract WContainer createCompletionsRootWidget()
    • createCompletionsValueWidth

      protected abstract <T extends WWidget & WTextBox.ICompletionItem> T createCompletionsValueWidth(String completion, boolean selected)
    • onCalculateSize

      protected void onCalculateSize()
      Overrides:
      onCalculateSize in class WWidget
    • calculateWidgetPositions

      public void calculateWidgetPositions()
      Overrides:
      calculateWidgetPositions in class WWidget
    • move

      public void move(double deltaX, double deltaY)
      Overrides:
      move in class WWidget
    • maxTextWidth

      protected double maxTextWidth()
    • onMouseClicked

      public boolean onMouseClicked(double mouseX, double mouseY, int button, boolean used)
      Overrides:
      onMouseClicked in class WWidget
    • onMouseMoved

      public void onMouseMoved(double mouseX, double mouseY, double lastMouseX, double lastMouseY)
      Overrides:
      onMouseMoved in class WWidget
    • onMouseReleased

      public boolean onMouseReleased(double mouseX, double mouseY, int button)
      Overrides:
      onMouseReleased in class WWidget
    • onKeyPressed

      public boolean onKeyPressed(int key, int mods)
      Overrides:
      onKeyPressed in class WWidget
    • onKeyRepeated

      public boolean onKeyRepeated(int key, int mods)
      Overrides:
      onKeyRepeated in class WWidget
    • onCharTyped

      public boolean onCharTyped(char c)
      Overrides:
      onCharTyped in class WWidget
    • render

      public boolean render(GuiRenderer renderer, double mouseX, double mouseY, double delta)
      Overrides:
      render in class WWidget
    • onCursorChanged

      protected void onCursorChanged()
    • getTextWidth

      protected double getTextWidth(int pos)
    • getCursorTextWidth

      protected double getCursorTextWidth(int offset)
    • getOverflowWidthForRender

      protected double getOverflowWidthForRender()
    • get

      public String get()
    • set

      public void set(String text)
    • isFocused

      public boolean isFocused()
    • setFocused

      public void setFocused(boolean focused)
    • setCursorMax

      public void setCursorMax()