public class StringWalker
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
applyStyles |
protected char |
c |
protected int |
currentLine |
protected int |
endIndex |
protected MalisisFont |
font |
protected net.minecraft.util.text.TextFormatting |
format |
protected int |
index |
protected boolean |
isEOL |
protected java.util.List<java.lang.String> |
lines |
protected boolean |
litteral |
protected boolean |
skipChars |
protected java.lang.String |
str |
protected java.util.LinkedList<FontOptions> |
styles |
protected float |
width |
| Constructor and Description |
|---|
StringWalker(java.util.List<java.lang.String> lines,
MalisisFont font,
FontOptions options) |
StringWalker(java.lang.String str,
MalisisFont font,
FontOptions options) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyStyle(net.minecraft.util.text.TextFormatting format) |
void |
applyStyles(boolean apply) |
protected void |
checkFormatting() |
void |
endIndex(int index) |
char |
getChar() |
int |
getCurrentLine() |
FontOptions |
getCurrentStyle() |
java.lang.String |
getCurrentText() |
net.minecraft.util.text.TextFormatting |
getFormatting() |
int |
getIndex() |
float |
getWidth() |
boolean |
isApplyStyles() |
boolean |
isEndOfText() |
boolean |
isEOL() |
boolean |
isFormatted() |
void |
setLitteral(boolean litteral) |
void |
skipChars(boolean skip) |
void |
startIndex(int index) |
boolean |
walk() |
float |
walkToCharacter(int c)
Walk to character index
c and return the coordinate for that character. |
int |
walkToCoord(float x)
Walk to the specified
x coordinate and returns the character index at that coordinate. |
protected MalisisFont font
protected java.lang.String str
protected boolean litteral
protected boolean skipChars
protected boolean applyStyles
protected java.util.List<java.lang.String> lines
protected int currentLine
protected boolean isEOL
protected int index
protected int endIndex
protected char c
protected net.minecraft.util.text.TextFormatting format
protected float width
protected java.util.LinkedList<FontOptions> styles
public StringWalker(java.lang.String str,
MalisisFont font,
FontOptions options)
public StringWalker(java.util.List<java.lang.String> lines,
MalisisFont font,
FontOptions options)
public void setLitteral(boolean litteral)
public void skipChars(boolean skip)
public void applyStyles(boolean apply)
public boolean isApplyStyles()
public int getIndex()
public char getChar()
public net.minecraft.util.text.TextFormatting getFormatting()
public boolean isFormatted()
public float getWidth()
public void startIndex(int index)
public void endIndex(int index)
public int getCurrentLine()
public java.lang.String getCurrentText()
public FontOptions getCurrentStyle()
public boolean isEOL()
public boolean isEndOfText()
protected void checkFormatting()
protected void applyStyle(net.minecraft.util.text.TextFormatting format)
public float walkToCharacter(int c)
c and return the coordinate for that character.c - the cpublic int walkToCoord(float x)
x coordinate and returns the character index at that coordinate.x - the xpublic boolean walk()