Package zombie.ui
Class UITextBox2
java.lang.Object
zombie.ui.UIElement
zombie.ui.UITextBox2
public class UITextBox2 extends UIElement
-
Field Summary
Fields Modifier and Type Field Description Color
BadColour
boolean
bMask
boolean
Centred
static boolean
ConsoleHasFocus
int
CursorLine
boolean
DoingTextEntry
UINineGrid
Frame
Color
GoodColour
boolean
ignoreFirst
java.lang.String
internalText
boolean
IsEditable
java.util.Stack
Lines
java.lang.String
maskChr
boolean
multipleLine
Color
NuetralColour
Color
NuetralColour2
boolean
ResizeParent
Color
StandardFrameColour
java.lang.String
Text
Color
TextEntryCursorColour
Color
TextEntryCursorColour2
int
TextEntryCursorPos
Color
TextEntryFrameColour
int
TextEntryMaxLength
java.util.ArrayList
TextOffsetOfLineStart
int
ToSelectionIndex
Fields inherited from class zombie.ui.UIElement
alwaysBack, anchorBottom, anchorLeft, anchorRight, anchorTop, bScrollChildren, bScrollWithParent, capture, clickedValue, Controls, defaultDraw, followGameWorld, height, IgnoreLossControl, Parent, playerContext, table, visible, width, x, y
-
Constructor Summary
Constructors Constructor Description UITextBox2(UIFont font, int x, int y, int width, int height, java.lang.String text, boolean HasFrame)
-
Method Summary
Modifier and Type Method Description void
ClearHighlights()
void
clearInput()
void
focus()
boolean
getForceUpperCase()
int
getInset()
java.lang.String
getInternalText()
int
getMaxLines()
int
getMaxTextLength()
java.lang.String
getText()
void
ignoreFirstInput()
boolean
isFocused()
boolean
isOnlyNumbers()
void
onCommandEntered()
boolean
onMouseDown(int x, int y)
boolean
onMouseMove(int dx, int dy)
void
onMouseMoveOutside(int dx, int dy)
boolean
onMouseUp(int x, int y)
void
onMouseUpOutside(int x, int y)
void
onOtherKey(int key)
void
onPressDown()
void
onPressUp()
void
onresize()
void
onTextChange()
void
render()
void
resetBlink()
void
setClearButton(boolean hasButton)
void
setCursorLine(int line)
void
setEditable(boolean b)
void
setForceUpperCase(boolean forceUpperCase)
void
setHasFrame(boolean hasFrame)
void
setMasked(boolean b)
void
setMaxLines(int maxLines)
void
setMaxTextLength(int maxtextLength)
void
setMultipleLine(boolean multiple)
void
setOnlyNumbers(boolean onlyNumbers)
void
SetText(java.lang.String text)
void
setTextColor(ColorInfo newColor)
int
toDisplayLine(int textOffset)
void
unfocus()
void
update()
void
updateText()
Methods inherited from class zombie.ui.UIElement
AddChild, backMost, bringToTop, ButtonClicked, clampToParentX, clampToParentY, ClearChildren, clearMaxDrawHeight, clearStencilRect, DrawText, DrawText, DrawText, DrawText, DrawTextCentre, DrawTextCentre, DrawTextRight, DrawTextRight, DrawTextUntrimmed, DrawTexture, DrawTexture, DrawTexture_FlippedX, DrawTexture_FlippedXIgnoreOffset, DrawTextureAngle, DrawTextureCol, DrawTextureColor, DrawTextureIgnoreOffset, DrawTextureScaled, DrawTextureScaledAspect, DrawTextureScaledAspect2, DrawTextureScaledCol, DrawTextureScaledCol, DrawTextureScaledColor, DrawTextureScaledUniform, DrawUVSliceTexture, getAbsoluteX, getAbsoluteY, getClickedValue, getControls, getHeight, getMaxDrawHeight, getParent, getPlayerContext, getScrollChildren, getScrollHeight, getScrollWithParent, getTable, getUIName, getWidth, getX, getXScroll, getXScrolled, getY, getYScroll, getYScrolled, ignoreHeightChange, ignoreWidthChange, isAnchorBottom, isAnchorLeft, isAnchorRight, isAnchorTop, isCapture, isDefaultDraw, isFollowGameWorld, isIgnoreLossControl, isMouseOver, isPointOver, isVisible, onMouseWheel, onResize, onRightMouseDown, onRightMouseUp, RemoveChild, RemoveControl, repaintStencilRect, resumeStencil, setAlwaysOnTop, setAnchorBottom, setAnchorLeft, setAnchorRight, setAnchorTop, setCapture, setClickedValue, setConsumeMouseEvents, setControls, setDefaultDraw, setFollowGameWorld, setHeight, setHeightOnly, setHeightSilent, setIgnoreLossControl, setMaxDrawHeight, setParent, setPlayerContext, setScrollChildren, setScrollHeight, setScrollWithParent, setStencilRect, setTable, setUIName, setVisible, setWidth, setWidthOnly, setWidthSilent, setX, setXScroll, setY, setYScroll, suspendStencil
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
ConsoleHasFocus
public static boolean ConsoleHasFocus -
ResizeParent
public boolean ResizeParent -
Lines
public java.util.Stack Lines -
Frame
-
Text
public java.lang.String Text -
Centred
public boolean Centred -
StandardFrameColour
-
TextEntryFrameColour
-
TextEntryCursorColour
-
TextEntryCursorColour2
-
NuetralColour
-
NuetralColour2
-
BadColour
-
GoodColour
-
DoingTextEntry
public boolean DoingTextEntry -
TextEntryCursorPos
public int TextEntryCursorPos -
TextEntryMaxLength
public int TextEntryMaxLength -
IsEditable
public boolean IsEditable -
CursorLine
public int CursorLine -
multipleLine
public boolean multipleLine -
TextOffsetOfLineStart
public java.util.ArrayList TextOffsetOfLineStart -
ToSelectionIndex
public int ToSelectionIndex -
internalText
public java.lang.String internalText -
maskChr
public java.lang.String maskChr -
bMask
public boolean bMask -
ignoreFirst
public boolean ignoreFirst
-
-
Constructor Details
-
UITextBox2
public UITextBox2(UIFont font, int x, int y, int width, int height, java.lang.String text, boolean HasFrame)
-
-
Method Details
-
ClearHighlights
public void ClearHighlights() -
setMasked
public void setMasked(boolean b) -
onresize
public void onresize() -
render
public void render() -
setTextColor
-
getText
public java.lang.String getText() -
getInternalText
public java.lang.String getInternalText() -
update
public void update() -
getInset
public int getInset() -
setEditable
public void setEditable(boolean b) -
onMouseUp
public boolean onMouseUp(int x, int y) -
onMouseUpOutside
public void onMouseUpOutside(int x, int y) -
onMouseMove
public boolean onMouseMove(int dx, int dy)- Overrides:
onMouseMove
in classUIElement
-
onMouseMoveOutside
public void onMouseMoveOutside(int dx, int dy)- Overrides:
onMouseMoveOutside
in classUIElement
-
focus
public void focus() -
unfocus
public void unfocus() -
ignoreFirstInput
public void ignoreFirstInput() -
onMouseDown
public boolean onMouseDown(int x, int y)- Overrides:
onMouseDown
in classUIElement
-
updateText
public void updateText() -
SetText
public void SetText(java.lang.String text) -
clearInput
public void clearInput() -
onPressUp
public void onPressUp() -
onPressDown
public void onPressDown() -
onCommandEntered
public void onCommandEntered() -
onTextChange
public void onTextChange() -
onOtherKey
public void onOtherKey(int key) -
getMaxTextLength
public int getMaxTextLength() -
setMaxTextLength
public void setMaxTextLength(int maxtextLength) -
getForceUpperCase
public boolean getForceUpperCase() -
setForceUpperCase
public void setForceUpperCase(boolean forceUpperCase) -
setHasFrame
public void setHasFrame(boolean hasFrame) -
setClearButton
public void setClearButton(boolean hasButton) -
toDisplayLine
public int toDisplayLine(int textOffset) -
setMultipleLine
public void setMultipleLine(boolean multiple) -
setCursorLine
public void setCursorLine(int line) -
getMaxLines
public int getMaxLines() -
setMaxLines
public void setMaxLines(int maxLines) -
isFocused
public boolean isFocused() -
isOnlyNumbers
public boolean isOnlyNumbers() -
setOnlyNumbers
public void setOnlyNumbers(boolean onlyNumbers) -
resetBlink
public void resetBlink()
-