Property | Type | Description | |
---|---|---|---|
alignment | TextAlignment | ||
baseline | float | ||
bitmapFont | UIFont, | ||
dynamicFont | Font | ||
encoding | bool | ||
finalLineHeight | float | ||
finalSize | int | ||
finalSpacingX | float | ||
fontScale | float | ||
fontSize | int | ||
fontStyle | FontStyle, | ||
glyph | GlyphInfo | ||
gradient | bool | ||
gradientBottom | Color | ||
gradientTop | Color | ||
maxLines | int | ||
pixelDensity | float | ||
premultiply | bool | ||
rectHeight | int | ||
rectWidth | int | ||
spacingX | float | ||
spacingY | float | ||
symbolStyle | SymbolStyle | ||
tint | Color | ||
useSymbols | bool |
Method | Description | |
---|---|---|
Align ( BetterList |
Align the vertices to be right or center-aligned given the line width specified by NGUIText.lineWidth.
|
|
CalculateOffsetToFit ( string text ) : int |
Calculate the character index offset required to print the end of the specified text.
|
|
CalculatePrintedSize ( string text ) : Vector2 |
Get the printed size of the specified string. The returned value is in pixels.
|
|
EncodeColor ( Color c ) : string |
The reverse of ParseColor -- encodes a color in RrGgBb format.
|
|
EndLine ( StringBuilder &s ) : void |
Convenience function that ends the line by either appending a new line character or replacing a space with one.
|
|
GetClosestCharacter ( BetterList |
Get the index of the closest character within the provided list of values. This function first sorts by Y, and only then by X.
|
|
GetEndOfLineThatFits ( string text ) : string |
Get the end of line that would fit into a field of given width.
|
|
GetGlyph ( int ch, int prev ) : GlyphInfo |
Get the specified glyph.
|
|
GetGlyphWidth ( int ch, int prev ) : float |
Get the width of the specified glyph. Returns zero if the glyph could not be retrieved.
|
|
GetSymbol ( string text, int index, int textLength ) : BMSymbol, |
Get the specified symbol.
|
|
ParseColor ( string text, int offset ) : Color |
Parse a RrGgBb color encoded in the string.
|
|
ParseSymbol ( string text, int &index ) : bool |
Parse an embedded symbol, such as [FFAA00] (set color) or [-] (undo color change). Returns whether the index was adjusted.
|
|
ParseSymbol ( string text, int &index, BetterList |
Parse the symbol, if possible. Returns 'true' if the 'index' was adjusted. Advanced symbol support contributed by Rudy Pangestu.
|
|
Prepare ( string text ) : void |
Prepare to use the specified text.
|
|
Print ( string text, BetterList |
Print the specified text into the buffers.
|
|
PrintCaretAndSelection ( string text, int start, int end, BetterList |
Print the caret and selection vertices. Note that it's expected that 'text' has been stripped clean of symbols.
|
|
PrintCharacterPositions ( string text, BetterList |
Print character positions and indices into the specified buffer. Meant to be used with the "find closest vertex" calculations.
|
|
RequestCharactersInTexture ( Font font, string text ) : void |
Ensure that we have the requested characters present.
|
|
StripSymbols ( string text ) : string |
Runs through the specified string and removes all color-encoding symbols.
|
|
Update ( ) : void |
Recalculate the 'final' values.
|
|
Update ( bool request ) : void |
Recalculate the 'final' values.
|
|
WrapText ( string text, string &finalText ) : bool |
Text wrapping functionality. The 'width' and 'height' should be in pixels.
|
|
WrapText ( string text, string &finalText, bool keepCharCount ) : bool |
Text wrapping functionality. The 'width' and 'height' should be in pixels.
|
Method | Description | |
---|---|---|
ReplaceSpaceWithNewline ( StringBuilder &s ) : void |
Convenience function that ends the line by replacing a space with a newline character.
|
static public Align ( BetterList |
||
verts | BetterList |
|
indexOffset | int | |
offset | float | |
return | void |
static public CalculateOffsetToFit ( string text ) : int | ||
text | string | |
return | int |
static public CalculatePrintedSize ( string text ) : Vector2 | ||
text | string | |
return | Vector2 |
static public EncodeColor ( Color c ) : string | ||
c | Color | |
return | string |
static public EndLine ( StringBuilder &s ) : void | ||
s | StringBuilder | |
return | void |
static public GetClosestCharacter ( BetterList |
||
verts | BetterList |
|
pos | Vector2 | |
return | int |
static public GetEndOfLineThatFits ( string text ) : string | ||
text | string | |
return | string |
static public GetGlyph ( int ch, int prev ) : GlyphInfo | ||
ch | int | |
prev | int | |
return | GlyphInfo |
static public GetGlyphWidth ( int ch, int prev ) : float | ||
ch | int | |
prev | int | |
return | float |
static public GetSymbol ( string text, int index, int textLength ) : BMSymbol, | ||
text | string | |
index | int | |
textLength | int | |
return | BMSymbol, |
static public ParseColor ( string text, int offset ) : Color | ||
text | string | |
offset | int | |
return | Color |
static public ParseSymbol ( string text, int &index ) : bool | ||
text | string | |
index | int | |
return | bool |
static public ParseSymbol ( string text, int &index, BetterList |
||
text | string | |
index | int | |
colors | BetterList |
|
premultiply | bool | |
sub | int | |
bold | bool | |
italic | bool | |
underline | bool | |
strike | bool | |
return | bool |
static public Print ( string text, BetterList |
||
text | string | |
verts | BetterList |
|
uvs | BetterList |
|
cols | BetterList |
|
return | void |
static public PrintCaretAndSelection ( string text, int start, int end, BetterList |
||
text | string | |
start | int | |
end | int | |
caret | BetterList |
|
highlight | BetterList |
|
return | void |
static public PrintCharacterPositions ( string text, BetterList |
||
text | string | |
verts | BetterList |
|
indices | BetterList |
|
return | void |
static public RequestCharactersInTexture ( Font font, string text ) : void | ||
font | Font | |
text | string | |
return | void |
static public StripSymbols ( string text ) : string | ||
text | string | |
return | string |
static public WrapText ( string text, string &finalText ) : bool | ||
text | string | |
finalText | string | |
return | bool |
static public WrapText ( string text, string &finalText, bool keepCharCount ) : bool | ||
text | string | |
finalText | string | |
keepCharCount | bool | |
return | bool |