public abstract class InputElementBase<T extends IElementGUI> extends Element<T>
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
text |
| Constructor and Description |
|---|
InputElementBase(T gui,
float posX,
float posY,
int width,
boolean editable,
java.lang.String text) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
allowKey(int key) |
void |
clearText() |
void |
deleteFromCursor(int amount) |
void |
deleteWords(int amount) |
int |
getNthWordFromCursor(int numWords) |
int |
getNthWordFromPos(int n,
int position) |
int |
getNthWordFromPosWhitespace(int n,
int position,
boolean skipWhitespace) |
java.lang.String |
getSelectedText() |
java.lang.String |
getText() |
boolean |
keyPressed(char character,
int key) |
boolean |
mouseClicked(float mouseX,
float mouseY,
int button) |
void |
moveCursorBy(int amount) |
protected abstract void |
onSubmit() |
void |
render(float mouseX,
float mouseY,
float partialTicks) |
void |
select() |
void |
setCursorPosition(int position) |
void |
setCursorPositionEnd() |
void |
setCursorPositionZero() |
void |
setEditable(boolean editable) |
void |
setSelectionPos(int position) |
void |
setText(java.lang.String text) |
void |
update() |
void |
writeText(java.lang.String text) |
drawOutline, drawOutline, drawRectangle, drawRectangle, drawTexturedRectangle, drawTexturedRectangle, endScissor, getChildren, getColorScheme, getHeight, getParent, getPosX, getPosY, getWidth, init, isEnabled, isSelected, isSelected, isVisible, mouseDragged, mouseReleased, mouseScrolled, renderChildren, setEnabled, setHeight, setPosX, setPosY, setVisible, setWidth, startScissor, withColorScheme, withParentpublic InputElementBase(T gui, float posX, float posY, int width, boolean editable, java.lang.String text)
protected abstract void onSubmit()
protected abstract boolean allowKey(int key)
public void update()
update in class Element<T extends IElementGUI>public void render(float mouseX,
float mouseY,
float partialTicks)
render in class Element<T extends IElementGUI>public boolean mouseClicked(float mouseX,
float mouseY,
int button)
mouseClicked in class Element<T extends IElementGUI>public boolean keyPressed(char character,
int key)
keyPressed in class Element<T extends IElementGUI>public void select()
public java.lang.String getText()
public java.lang.String getSelectedText()
public void writeText(java.lang.String text)
public void deleteWords(int amount)
public void deleteFromCursor(int amount)
public int getNthWordFromCursor(int numWords)
public int getNthWordFromPos(int n,
int position)
public int getNthWordFromPosWhitespace(int n,
int position,
boolean skipWhitespace)
public void moveCursorBy(int amount)
public void setCursorPosition(int position)
public void setCursorPositionZero()
public void setCursorPositionEnd()
public void setSelectionPos(int position)
public void clearText()
public void setText(java.lang.String text)
public void setEditable(boolean editable)