Draw text primitive. More...
Public Member Functions | |
Label () | |
Label constructor. | |
Label (string text, FontMap fontmap=null) | |
Label constructor. | |
override void | Draw () |
The draw function. | |
override bool | GetlContentLocalBounds (ref Bounds2 bounds) |
Return the Bounds2 object containing the text, in local space. | |
Bounds2 | GetlContentLocalBounds () |
Return the Bounds2 object containing the text, in local space. | |
Public Attributes | |
string | Text = "" |
The text to display. | |
Vector4 | Color = Colors.White |
The text color. | |
BlendMode | BlendMode = BlendMode.Normal |
The text blend mode. | |
float | HeightScale = 1.0f |
A scale factor applied to the character's pixel height during rendering. | |
FontMap | FontMap |
The fontmap used to display this Label (the character set has to match). | |
SpriteRenderer.ISpriteShader | Shader = (SpriteRenderer.ISpriteShader)Director.Instance.SpriteRenderer.DefaultFontShader |
User can set an external shader. | |
Properties | |
float | CharWorldHeight [get] |
The character height in world coordinates = FontHeight * HeightScale. |
Draw text primitive.
2 types of font data supported:
Label constructor.
text | The text to render. |
fontmap | The font data used for rendering the text. If null, an embedded debug font will be used. |
SpriteRenderer.ISpriteShader Shader = (SpriteRenderer.ISpriteShader)Director.Instance.SpriteRenderer.DefaultFontShader |
User can set an external shader.
The Label class won't dispose of shaders set by user.