Class TextFieldComponent

java.lang.Object
org.rusherhack.client.api.ui.window.content.WindowContent
org.rusherhack.client.api.ui.window.content.component.TextFieldComponent
All Implemented Interfaces:
org.rusherhack.core.interfaces.IClickable, org.rusherhack.core.interfaces.IHoverable, org.rusherhack.core.interfaces.IScrollable, org.rusherhack.core.interfaces.ITickable, org.rusherhack.core.interfaces.ITypeable

public class TextFieldComponent extends WindowContent
  • Constructor Details

    • TextFieldComponent

      public TextFieldComponent(Window window, double width)
    • TextFieldComponent

      public TextFieldComponent(Window window, String label, double width)
    • TextFieldComponent

      public TextFieldComponent(Window window, String label, double width, boolean censored)
  • Method Details

    • renderContent

      public void renderContent(double mouseX, double mouseY, WindowView parent)
      Specified by:
      renderContent in class WindowContent
    • unfocus

      public void unfocus()
      Description copied from class: WindowContent
      Called when the window loses focus. Should be used to unfocus things like text fields
      Overrides:
      unfocus in class WindowContent
    • getWidth

      public double getWidth()
      Specified by:
      getWidth in class WindowContent
    • getHeight

      public double getHeight()
      Specified by:
      getHeight in class WindowContent
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
    • mouseScrolled

      public boolean mouseScrolled(double mouseX, double mouseY, double delta)
    • charTyped

      public boolean charTyped(char character)
    • keyTyped

      public boolean keyTyped(int key, int scanCode, int modifiers)
    • getDisplayValue

      public String getDisplayValue()
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • getValue

      public String getValue()
    • setValue

      public void setValue(String value)
    • setWidth

      public void setWidth(double width)
    • setReturnCallback

      public void setReturnCallback(Consumer<String> returnCallback)
    • setCharacterFilter

      public void setCharacterFilter(Predicate<Character> characterFilter)
    • isFocused

      public boolean isFocused()
    • setFocused

      public void setFocused(boolean focused)