Class WTextBox
java.lang.Object
meteordevelopment.meteorclient.gui.widgets.WWidget
meteordevelopment.meteorclient.gui.widgets.input.WTextBox
- All Implemented Interfaces:
BaseWidget
- Direct Known Subclasses:
WMeteorTextBox
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected booleanprotected CharFilterprotected Stringprotected final WTextBox.Rendererprotected booleanprotected intprotected intprotected Stringprotected doubleprotected it.unimi.dsi.fastutil.doubles.DoubleList -
Constructor Summary
ConstructorsConstructorDescriptionWTextBox(String text, String placeholder, CharFilter filter, Class<? extends WTextBox.Renderer> renderer) WTextBox(String text, CharFilter filter, Class<? extends WTextBox.Renderer> renderer) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected abstract WContainerprotected abstract <T extends WWidget & WTextBox.ICompletionItem>
TcreateCompletionsValueWidth(String completion, boolean selected) get()protected doublegetCursorTextWidth(int offset) protected doubleprotected doublegetTextWidth(int pos) protected doublevoidmove(double deltaX, double deltaY) protected voidbooleanonCharTyped(net.minecraft.client.input.CharInput input) protected voidbooleanonKeyPressed(net.minecraft.client.input.KeyInput input) booleanonKeyRepeated(net.minecraft.client.input.KeyInput input) booleanonMouseClicked(net.minecraft.client.gui.Click click, boolean doubled) voidonMouseMoved(double mouseX, double mouseY, double lastMouseX, double lastMouseY) booleanonMouseReleased(net.minecraft.client.gui.Click click) booleanrender(GuiRenderer renderer, double mouseX, double mouseY, double delta) voidvoidvoidsetFocused(boolean focused) Methods inherited from class meteordevelopment.meteorclient.gui.widgets.WWidget
calculateSize, charTyped, getRoot, getTheme, getView, init, invalidate, isFocused, isOver, keyPressed, keyRepeated, mouseClicked, mouseMoved, mouseReleased, mouseScrolled, onCalculateWidgetPositions, onMouseScrolled, onRender, pad
-
Field Details
-
action
-
actionOnUnfocused
-
text
-
placeholder
-
filter
-
renderer
-
textWidths
protected it.unimi.dsi.fastutil.doubles.DoubleList textWidths -
cursor
protected int cursor -
textStart
protected double textStart -
selecting
protected boolean selecting -
doubleClick
protected boolean doubleClick -
selectionStart
protected int selectionStart -
selectionEnd
protected int selectionEnd
-
-
Constructor Details
-
WTextBox
-
WTextBox
public WTextBox(String text, String placeholder, CharFilter filter, Class<? extends WTextBox.Renderer> renderer)
-
-
Method Details
-
createCompletionsRootWidget
-
createCompletionsValueWidth
protected abstract <T extends WWidget & WTextBox.ICompletionItem> T createCompletionsValueWidth(String completion, boolean selected) -
onCalculateSize
protected void onCalculateSize()- Overrides:
onCalculateSizein classWWidget
-
calculateWidgetPositions
public void calculateWidgetPositions()- Overrides:
calculateWidgetPositionsin classWWidget
-
move
public void move(double deltaX, double deltaY) -
maxTextWidth
protected double maxTextWidth() -
onMouseClicked
public boolean onMouseClicked(net.minecraft.client.gui.Click click, boolean doubled) - Overrides:
onMouseClickedin classWWidget
-
onMouseMoved
public void onMouseMoved(double mouseX, double mouseY, double lastMouseX, double lastMouseY) - Overrides:
onMouseMovedin classWWidget
-
onMouseReleased
public boolean onMouseReleased(net.minecraft.client.gui.Click click) - Overrides:
onMouseReleasedin classWWidget
-
onKeyPressed
public boolean onKeyPressed(net.minecraft.client.input.KeyInput input) - Overrides:
onKeyPressedin classWWidget
-
onKeyRepeated
public boolean onKeyRepeated(net.minecraft.client.input.KeyInput input) - Overrides:
onKeyRepeatedin classWWidget
-
onCharTyped
public boolean onCharTyped(net.minecraft.client.input.CharInput input) - Overrides:
onCharTypedin classWWidget
-
render
-
onCursorChanged
protected void onCursorChanged() -
getTextWidth
protected double getTextWidth(int pos) -
getCursorTextWidth
protected double getCursorTextWidth(int offset) -
getOverflowWidthForRender
protected double getOverflowWidthForRender() -
get
-
set
-
setFocused
public void setFocused(boolean focused) - Overrides:
setFocusedin classWWidget
-
setCursorMax
public void setCursorMax()
-