Свойство | 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 |
Méthode | 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.
|
Méthode | 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 | |
Résultat | void |
static public CalculateOffsetToFit ( string text ) : int | ||
text | string | |
Résultat | int |
static public CalculatePrintedSize ( string text ) : Vector2 | ||
text | string | |
Résultat | Vector2 |
static public EncodeColor ( Color c ) : string | ||
c | Color | |
Résultat | string |
static public EndLine ( StringBuilder &s ) : void | ||
s | StringBuilder | |
Résultat | void |
static public GetClosestCharacter ( BetterList |
||
verts | BetterList |
|
pos | Vector2 | |
Résultat | int |
static public GetEndOfLineThatFits ( string text ) : string | ||
text | string | |
Résultat | string |
static public GetGlyph ( int ch, int prev ) : GlyphInfo | ||
ch | int | |
prev | int | |
Résultat | GlyphInfo |
static public GetGlyphWidth ( int ch, int prev ) : float | ||
ch | int | |
prev | int | |
Résultat | float |
static public GetSymbol ( string text, int index, int textLength ) : BMSymbol, | ||
text | string | |
index | int | |
textLength | int | |
Résultat | BMSymbol, |
static public ParseColor ( string text, int offset ) : Color | ||
text | string | |
offset | int | |
Résultat | Color |
static public ParseSymbol ( string text, int &index ) : bool | ||
text | string | |
index | int | |
Résultat | 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 | |
Résultat | bool |
static public Prepare ( string text ) : void | ||
text | string | |
Résultat | void |
static public Print ( string text, BetterList |
||
text | string | |
verts | BetterList |
|
uvs | BetterList |
|
cols | BetterList |
|
Résultat | void |
static public PrintCaretAndSelection ( string text, int start, int end, BetterList |
||
text | string | |
start | int | |
end | int | |
caret | BetterList |
|
highlight | BetterList |
|
Résultat | void |
static public PrintCharacterPositions ( string text, BetterList |
||
text | string | |
verts | BetterList |
|
indices | BetterList |
|
Résultat | void |
static public RequestCharactersInTexture ( Font font, string text ) : void | ||
font | Font | |
text | string | |
Résultat | void |
static public StripSymbols ( string text ) : string | ||
text | string | |
Résultat | string |
static public Update ( bool request ) : void | ||
request | bool | |
Résultat | void |
static public WrapText ( string text, string &finalText ) : bool | ||
text | string | |
finalText | string | |
Résultat | bool |
static public WrapText ( string text, string &finalText, bool keepCharCount ) : bool | ||
text | string | |
finalText | string | |
keepCharCount | bool | |
Résultat | bool |