NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
UILabel Class Reference
Inheritance diagram for UILabel:
UIWidget UIRect

Public Types

enum  Effect { Effect.None, Effect.Shadow, Effect.Outline }
 
enum  Overflow { Overflow.ShrinkContent, Overflow.ClampContent, Overflow.ResizeFreely, Overflow.ResizeHeight }
 
enum  Crispness { Crispness.Never, Crispness.OnDesktop, Crispness.Always }
 
- Public Types inherited from UIWidget
enum  Pivot {
  Pivot.TopLeft, Pivot.Top, Pivot.TopRight, Pivot.Left,
  Pivot.Center, Pivot.Right, Pivot.BottomLeft, Pivot.Bottom,
  Pivot.BottomRight
}
 
enum  AspectRatioSource { AspectRatioSource.Free, AspectRatioSource.BasedOnWidth, AspectRatioSource.BasedOnHeight }
 
- Public Types inherited from UIRect
enum  AnchorUpdate { AnchorUpdate.OnEnable, AnchorUpdate.OnUpdate, AnchorUpdate.OnStart }
 

Public Member Functions

override Vector3[] GetSides (Transform relativeTo)
 Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom. More...
 
override void MarkAsChanged ()
 UILabel needs additional processing when something changes. More...
 
void ProcessText ()
 Process the raw text, called when something changes. More...
 
override void MakePixelPerfect ()
 Text is pixel-perfect when its scale matches the size. More...
 
void AssumeNaturalSize ()
 Make the label assume its natural size. More...
 
int GetCharacterIndex (Vector3 worldPos)
 
int GetCharacterIndex (Vector2 localPos)
 
int GetCharacterIndexAtPosition (Vector3 worldPos, bool precise)
 Return the index of the character at the specified world position. More...
 
int GetCharacterIndexAtPosition (Vector2 localPos, bool precise)
 Return the index of the character at the specified local position. More...
 
string GetWordAtPosition (Vector3 worldPos)
 Retrieve the word directly below the specified world-space position. More...
 
string GetWordAtPosition (Vector2 localPos)
 Retrieve the word directly below the specified relative-to-label position. More...
 
string GetWordAtCharacterIndex (int characterIndex)
 Retrieve the word right under the specified character index. More...
 
string GetUrlAtPosition (Vector3 worldPos)
 Retrieve the URL directly below the specified world-space position. More...
 
string GetUrlAtPosition (Vector2 localPos)
 Retrieve the URL directly below the specified relative-to-label position. More...
 
string GetUrlAtCharacterIndex (int characterIndex)
 Retrieve the URL right under the specified character index. More...
 
int GetCharacterIndex (int currentIndex, KeyCode key)
 Get the index of the character on the line directly above or below the current index. More...
 
void PrintOverlay (int start, int end, UIGeometry caret, UIGeometry highlight, Color caretColor, Color highlightColor)
 Fill the specified geometry buffer with vertices that would highlight the current selection. More...
 
override void OnFill (BetterList< Vector3 > verts, BetterList< Vector2 > uvs, BetterList< Color32 > cols)
 Draw the label. More...
 
Vector2 ApplyOffset (BetterList< Vector3 > verts, int start)
 Align the vertices, making the label positioned correctly based on the pivot. Returns the offset that was applied. More...
 
void ApplyShadow (BetterList< Vector3 > verts, BetterList< Vector2 > uvs, BetterList< Color32 > cols, int start, int end, float x, float y)
 Apply a shadow effect to the buffer. More...
 
int CalculateOffsetToFit (string text)
 Calculate the character index offset necessary in order to print the end of the specified text. More...
 
void SetCurrentProgress ()
 Convenience function, in case you wanted to associate progress bar, slider or scroll bar's OnValueChanged function in inspector with a label. More...
 
void SetCurrentPercent ()
 Convenience function, in case you wanted to associate progress bar, slider or scroll bar's OnValueChanged function in inspector with a label. More...
 
void SetCurrentSelection ()
 Convenience function, in case you wanted to automatically set some label's text by selecting a value in the UIPopupList. More...
 
bool Wrap (string text, out string final)
 Convenience function – wrap the current text given the label's settings and unlimited height. More...
 
bool Wrap (string text, out string final, int height)
 Convenience function – wrap the current text given the label's settings and the given height. More...
 
void UpdateNGUIText ()
 Update NGUIText.current with all the properties from this label. More...
 
- Public Member Functions inherited from UIWidget
delegate void OnDimensionsChanged ()
 
delegate void OnPostFillCallback (UIWidget widget, int bufferOffset, BetterList< Vector3 > verts, BetterList< Vector2 > uvs, BetterList< Color32 > cols)
 
delegate bool HitCheck (Vector3 worldPos)
 
void SetDimensions (int w, int h)
 Adjust the widget's dimensions without going through the anchor validation logic. More...
 
override float CalculateFinalAlpha (int frameID)
 Widget's final alpha, after taking the panel's alpha into account. More...
 
override void Invalidate (bool includeChildren)
 Update the widget's visibility and final alpha. More...
 
float CalculateCumulativeAlpha (int frameID)
 Same as final alpha, except it doesn't take own visibility into consideration. Used by panels. More...
 
override void SetRect (float x, float y, float width, float height)
 Set the widget's rectangle. More...
 
void ResizeCollider ()
 Adjust the widget's collider size to match the widget's dimensions. More...
 
Bounds CalculateBounds ()
 Calculate the widget's bounds, optionally making them relative to the specified transform. More...
 
Bounds CalculateBounds (Transform relativeParent)
 Calculate the widget's bounds, optionally making them relative to the specified transform. More...
 
void SetDirty ()
 Mark the widget as changed so that the geometry can be rebuilt. More...
 
void RemoveFromPanel ()
 Remove this widget from the panel. More...
 
UIPanel CreatePanel ()
 Ensure we have a panel referencing this widget. More...
 
void CheckLayer ()
 Check to ensure that the widget resides on the same layer as its panel. More...
 
override void ParentHasChanged ()
 Checks to ensure that the widget is still parented to the right panel. More...
 
bool UpdateVisibility (bool visibleByAlpha, bool visibleByPanel)
 Update the widget's visibility state. More...
 
bool UpdateTransform (int frame)
 Check to see if the widget has moved relative to the panel that manages it More...
 
bool UpdateGeometry (int frame)
 Update the widget and fill its geometry if necessary. Returns whether something was changed. More...
 
void WriteToBuffers (BetterList< Vector3 > v, BetterList< Vector2 > u, BetterList< Color32 > c, BetterList< Vector3 > n, BetterList< Vector4 > t)
 Append the local geometry buffers to the specified ones. More...
 
- Public Member Functions inherited from UIRect
void Update ()
 Rectangles need to update in a specific order – parents before children. When deriving from this class, override its OnUpdate() function instead. More...
 
void UpdateAnchors ()
 Manually update anchored sides. More...
 
void SetAnchor (Transform t)
 Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions. More...
 
void SetAnchor (GameObject go)
 Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions. More...
 
void SetAnchor (GameObject go, int left, int bottom, int right, int top)
 Anchor this rectangle to the specified transform. More...
 
void ResetAnchors ()
 Ensure that all rect references are set correctly on the anchors. More...
 
void ResetAndUpdateAnchors ()
 Convenience method that resets and updates the anchors, all at once. More...
 

Public Attributes

Crispness keepCrispWhenShrunk = Crispness.OnDesktop
 Whether the label will keep its content crisp even when shrunk. You may want to turn this off on mobile devices. More...
 
- Public Attributes inherited from UIWidget
OnDimensionsChanged onChange
 Notification triggered when the widget's dimensions or position changes. More...
 
OnPostFillCallback onPostFill
 Notification triggered after the widget's buffer has been filled. More...
 
UIDrawCall.OnRenderCallback mOnRender
 Callback triggered when the widget is about to be renderered (OnWillRenderObject). NOTE: This property is only exposed for the sake of speed to avoid property execution. In most cases you will want to use UIWidget.onRender instead. More...
 
bool autoResizeBoxCollider = false
 If set to 'true', the box collider's dimensions will be adjusted to always match the widget whenever it resizes. More...
 
bool hideIfOffScreen = false
 Hide the widget if it happens to be off-screen. More...
 
AspectRatioSource keepAspectRatio = AspectRatioSource.Free
 Whether the rectangle will attempt to maintain a specific aspect ratio. More...
 
float aspectRatio = 1f
 If you want the anchored rectangle to keep a specific aspect ratio, set this value. More...
 
HitCheck hitCheck
 Custom hit check function. If set, all hit checks (including events) will call this function, passing the world position. Return 'true' if it's within the bounds of your choice, 'false' otherwise. More...
 
UIPanel panel
 Panel that's managing this widget. More...
 
UIGeometry geometry = new UIGeometry()
 Widget's generated geometry. More...
 
bool fillGeometry = true
 If set to 'false', the widget's OnFill function will not be called, letting you define custom geometry at will. More...
 
UIDrawCall drawCall
 Internal usage – draw call that's drawing the widget. More...
 
- Public Attributes inherited from UIRect
AnchorPoint leftAnchor = new AnchorPoint()
 Left side anchor. More...
 
AnchorPoint rightAnchor = new AnchorPoint(1f)
 Right side anchor. More...
 
AnchorPoint bottomAnchor = new AnchorPoint()
 Bottom side anchor. More...
 
AnchorPoint topAnchor = new AnchorPoint(1f)
 Top side anchor. More...
 
AnchorUpdate updateAnchors = AnchorUpdate.OnUpdate
 Whether anchors will be recalculated on every update. More...
 
float finalAlpha = 1f
 Final calculated alpha. More...
 

Protected Member Functions

override void OnInit ()
 Register the font texture change listener. More...
 
override void OnDisable ()
 Remove the font texture change listener. More...
 
void SetActiveFont (Font fnt)
 Set the active font, correctly setting and clearing callbacks. More...
 
override void UpgradeFrom265 ()
 Upgrading labels is a bit different. More...
 
override void OnAnchor ()
 If the label is anchored it should not auto-resize. More...
 
override void OnStart ()
 Determine start-up values. More...
 
- Protected Member Functions inherited from UIWidget
override void OnEnable ()
 Automatically find the parent rectangle. More...
 
void UpdateFinalAlpha (int frameID)
 Force-calculate the final alpha value. More...
 
virtual void Awake ()
 Remember whether we're in play mode. More...
 
override void OnUpdate ()
 Ensure we have a panel to work with. More...
 
- Protected Member Functions inherited from UIRect
Vector3 GetLocalPos (AnchorPoint ac, Transform trans)
 Helper function that gets the specified anchor's position relative to the chosen transform. More...
 
void Start ()
 Set anchor rect references on start. More...
 

Properties

override bool isAnchoredHorizontally [get]
 Whether the rectangle is anchored horizontally. More...
 
override bool isAnchoredVertically [get]
 Whether the rectangle is anchored vertically. More...
 
override Material material [get, set]
 Retrieve the material used by the font. More...
 
UIFont font [get, set]
 
UIFont bitmapFont [get, set]
 Set the font used by this label. More...
 
Font trueTypeFont [get, set]
 Set the font used by this label. More...
 
UnityEngine.Object ambigiousFont [get, set]
 Ambiguous helper function. More...
 
string text [get, set]
 Text that's being displayed by the label. More...
 
int defaultFontSize [get]
 Default font size. More...
 
int fontSize [get, set]
 Active font size used by the label. More...
 
FontStyle fontStyle [get, set]
 Dynamic font style used by the label. More...
 
Alignment alignment [get, set]
 Text alignment option. More...
 
bool applyGradient [get, set]
 Whether a gradient will be applied. More...
 
Color gradientTop [get, set]
 Top gradient color. More...
 
Color gradientBottom [get, set]
 Bottom gradient color. More...
 
int spacingX [get, set]
 Additional horizontal spacing between characters when printing text. More...
 
int spacingY [get, set]
 Additional vertical spacing between lines when printing text. More...
 
bool supportEncoding [get, set]
 Whether this label will support color encoding in the format of [RRGGBB] and new line in the form of a "\\n" string. More...
 
NGUIText.SymbolStyle symbolStyle [get, set]
 Style used for symbols. More...
 
Overflow overflowMethod [get, set]
 Overflow method controls the label's behaviour when its content doesn't fit the bounds. More...
 
int lineWidth [get, set]
 Maximum width of the label in pixels. More...
 
int lineHeight [get, set]
 Maximum height of the label in pixels. More...
 
bool multiLine [get, set]
 Whether the label supports multiple lines. More...
 
override Vector3[] localCorners [get]
 Process the label's text before returning its corners. More...
 
override Vector3[] worldCorners [get]
 Process the label's text before returning its corners. More...
 
override Vector4 drawingDimensions [get]
 Process the label's text before returning its drawing dimensions. More...
 
int maxLineCount [get, set]
 The max number of lines to be displayed for the label More...
 
Effect effectStyle [get, set]
 What effect is used by the label. More...
 
Color effectColor [get, set]
 Color used by the effect, if it's enabled. More...
 
Vector2 effectDistance [get, set]
 Effect distance in pixels. More...
 
bool shrinkToFit [get, set]
 Whether the label will automatically shrink its size in order to fit the maximum line width. More...
 
string processedText [get]
 Returns the processed version of 'text', with new line characters, line wrapping, etc. More...
 
Vector2 printedSize [get]
 Actual printed size of the text, in pixels. More...
 
override Vector2 localSize [get]
 Local size of the widget, in pixels. More...
 
- Properties inherited from UIWidget
UIDrawCall.OnRenderCallback onRender [get, set]
 Set the callback that will be triggered when the widget is being rendered (OnWillRenderObject). This is where you would set material properties and shader values. More...
 
CanvasRenderer canvasRenderer [get]
 Canvas renderer that's responsible for the widget's geometry, if there is one present. More...
 
Vector4 drawRegion [get, set]
 Draw region alters how the widget looks without modifying the widget's rectangle. A region is made up of 4 relative values (0-1 range). The order is Left (X), Bottom (Y), Right (Z) and Top (W). To have a widget's left edge be 30% from the left side, set X to 0.3. To have the widget's right edge be 30% from the right hand side, set Z to 0.7. More...
 
Vector2 pivotOffset [get]
 Pivot offset in relative coordinates. Bottom-left is (0, 0). Top-right is (1, 1). More...
 
int width [get, set]
 Widget's width in pixels. More...
 
int height [get, set]
 Widget's height in pixels. More...
 
Color color [get, set]
 Color used by the widget. More...
 
override float alpha [get, set]
 Widget's alpha – a convenience method. More...
 
bool isVisible [get]
 Whether the widget is currently visible. More...
 
bool hasVertices [get]
 Whether the widget has vertices to draw. More...
 
Pivot rawPivot [get, set]
 Change the pivot point and do not attempt to keep the widget in the same place by adjusting its transform. More...
 
Pivot pivot [get, set]
 Set or get the value that specifies where the widget's pivot point should be. More...
 
int depth [get, set]
 Depth controls the rendering order – lowest to highest. More...
 
int raycastDepth [get]
 Raycast depth order on widgets takes the depth of their panel into consideration. This functionality is used to determine the "final" depth of the widget for drawing and raycasts. More...
 
override Vector3[] localCorners [get]
 Local space corners of the widget. The order is bottom-left, top-left, top-right, bottom-right. More...
 
virtual Vector2 localSize [get]
 Local width and height of the widget in pixels. More...
 
Vector3 localCenter [get]
 Widget's center in local coordinates. Don't forget to transform by the widget's transform. More...
 
override Vector3[] worldCorners [get]
 World-space corners of the widget. The order is bottom-left, top-left, top-right, bottom-right. More...
 
Vector3 worldCenter [get]
 World-space center of the widget. More...
 
virtual Vector4 drawingDimensions [get]
 Local space region where the actual drawing will take place. X = left, Y = bottom, Z = right, W = top. More...
 
virtual Material material [get, set]
 Material used by the widget. More...
 
virtual Texture mainTexture [get, set]
 Texture used by the widget. More...
 
virtual Shader shader [get, set]
 Shader is used to create a dynamic material if the widget has no material to work with. More...
 
Vector2 relativeSize [get]
 Do not use this, it's obsolete. More...
 
bool hasBoxCollider [get]
 Convenience function that returns 'true' if the widget has a box collider. More...
 
virtual int minWidth [get]
 Minimum allowed width for this widget. More...
 
virtual int minHeight [get]
 Minimum allowed height for this widget. More...
 
virtual Vector4 border [get, set]
 Dimensions of the sprite's border, if any. More...
 
- Properties inherited from UIRect
GameObject cachedGameObject [get]
 Game object gets cached for speed. Can't simply return 'mGo' set in Awake because this function may be called on a prefab. More...
 
Transform cachedTransform [get]
 Transform gets cached for speed. Can't simply return 'mTrans' set in Awake because this function may be called on a prefab. More...
 
Camera anchorCamera [get]
 Camera used by anchors. More...
 
bool isFullyAnchored [get]
 Whether the rectangle is currently anchored fully on all sides. More...
 
virtual bool isAnchoredHorizontally [get]
 Whether the rectangle is anchored horizontally. More...
 
virtual bool isAnchoredVertically [get]
 Whether the rectangle is anchored vertically. More...
 
virtual bool canBeAnchored [get]
 Whether the rectangle can be anchored. More...
 
UIRect parent [get]
 Get the rectangle's parent, if any. More...
 
UIRoot root [get]
 Get the root object, if any. More...
 
bool isAnchored [get]
 Returns 'true' if the widget is currently anchored on any side. More...
 
abstract float alpha [get, set]
 Local alpha, not relative to anything. More...
 
abstract Vector3[] localCorners [get]
 Local-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right. More...
 
abstract Vector3[] worldCorners [get]
 World-space corners of the UI rectangle. The order is bottom-left, top-left, top-right, bottom-right. More...
 
float cameraRayDistance [get]
 Helper function that returns the distance to the camera's directional vector hitting the panel's plane. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from UIWidget
static int FullCompareFunc (UIWidget left, UIWidget right)
 Static widget comparison function used for depth sorting. More...
 
static int PanelCompareFunc (UIWidget left, UIWidget right)
 Static widget comparison function used for inter-panel depth sorting. More...
 
- Protected Attributes inherited from UIWidget
Color mColor = Color.white
 
Pivot mPivot = Pivot.Center
 
int mWidth = 100
 
int mHeight = 100
 
int mDepth = 0
 
bool mPlayMode = true
 
Vector4 mDrawRegion = new Vector4(0f, 0f, 1f, 1f)
 
Vector3[] mCorners = new Vector3[4]
 
CanvasRenderer mRen
 
- Protected Attributes inherited from UIRect
GameObject mGo
 
Transform mTrans
 
BetterList< UIRectmChildren = new BetterList<UIRect>()
 
bool mChanged = true
 
bool mStarted = false
 
bool mParentFound = false
 
Camera mCam
 
- Static Protected Attributes inherited from UIRect
static Vector3[] mSides = new Vector3[4]
 

Member Enumeration Documentation

Enumerator
Never 
OnDesktop 
Always 
Enumerator
None 
Shadow 
Outline 
Enumerator
ShrinkContent 
ClampContent 
ResizeFreely 
ResizeHeight 

Member Function Documentation

Vector2 UILabel.ApplyOffset ( BetterList< Vector3 >  verts,
int  start 
)

Align the vertices, making the label positioned correctly based on the pivot. Returns the offset that was applied.

void UILabel.ApplyShadow ( BetterList< Vector3 >  verts,
BetterList< Vector2 >  uvs,
BetterList< Color32 >  cols,
int  start,
int  end,
float  x,
float  y 
)

Apply a shadow effect to the buffer.

void UILabel.AssumeNaturalSize ( )

Make the label assume its natural size.

int UILabel.CalculateOffsetToFit ( string  text)

Calculate the character index offset necessary in order to print the end of the specified text.

int UILabel.GetCharacterIndex ( Vector3  worldPos)
int UILabel.GetCharacterIndex ( Vector2  localPos)
int UILabel.GetCharacterIndex ( int  currentIndex,
KeyCode  key 
)

Get the index of the character on the line directly above or below the current index.

int UILabel.GetCharacterIndexAtPosition ( Vector3  worldPos,
bool  precise 
)

Return the index of the character at the specified world position.

int UILabel.GetCharacterIndexAtPosition ( Vector2  localPos,
bool  precise 
)

Return the index of the character at the specified local position.

override Vector3 [] UILabel.GetSides ( Transform  relativeTo)
virtual

Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.

Reimplemented from UIWidget.

string UILabel.GetUrlAtCharacterIndex ( int  characterIndex)

Retrieve the URL right under the specified character index.

string UILabel.GetUrlAtPosition ( Vector3  worldPos)

Retrieve the URL directly below the specified world-space position.

string UILabel.GetUrlAtPosition ( Vector2  localPos)

Retrieve the URL directly below the specified relative-to-label position.

string UILabel.GetWordAtCharacterIndex ( int  characterIndex)

Retrieve the word right under the specified character index.

string UILabel.GetWordAtPosition ( Vector3  worldPos)

Retrieve the word directly below the specified world-space position.

string UILabel.GetWordAtPosition ( Vector2  localPos)

Retrieve the word directly below the specified relative-to-label position.

override void UILabel.MakePixelPerfect ( )
virtual

Text is pixel-perfect when its scale matches the size.

Reimplemented from UIWidget.

override void UILabel.MarkAsChanged ( )
virtual

UILabel needs additional processing when something changes.

Reimplemented from UIWidget.

override void UILabel.OnAnchor ( )
protectedvirtual

If the label is anchored it should not auto-resize.

Reimplemented from UIWidget.

override void UILabel.OnDisable ( )
protectedvirtual

Remove the font texture change listener.

Reimplemented from UIWidget.

override void UILabel.OnFill ( BetterList< Vector3 >  verts,
BetterList< Vector2 >  uvs,
BetterList< Color32 >  cols 
)
virtual

Draw the label.

Reimplemented from UIWidget.

override void UILabel.OnInit ( )
protectedvirtual

Register the font texture change listener.

Reimplemented from UIWidget.

override void UILabel.OnStart ( )
protectedvirtual

Determine start-up values.

Reimplemented from UIWidget.

void UILabel.PrintOverlay ( int  start,
int  end,
UIGeometry  caret,
UIGeometry  highlight,
Color  caretColor,
Color  highlightColor 
)

Fill the specified geometry buffer with vertices that would highlight the current selection.

void UILabel.ProcessText ( )

Process the raw text, called when something changes.

void UILabel.SetActiveFont ( Font  fnt)
protected

Set the active font, correctly setting and clearing callbacks.

void UILabel.SetCurrentPercent ( )

Convenience function, in case you wanted to associate progress bar, slider or scroll bar's OnValueChanged function in inspector with a label.

void UILabel.SetCurrentProgress ( )

Convenience function, in case you wanted to associate progress bar, slider or scroll bar's OnValueChanged function in inspector with a label.

void UILabel.SetCurrentSelection ( )

Convenience function, in case you wanted to automatically set some label's text by selecting a value in the UIPopupList.

void UILabel.UpdateNGUIText ( )

Update NGUIText.current with all the properties from this label.

override void UILabel.UpgradeFrom265 ( )
protectedvirtual

Upgrading labels is a bit different.

Reimplemented from UIWidget.

bool UILabel.Wrap ( string  text,
out string  final 
)

Convenience function – wrap the current text given the label's settings and unlimited height.

bool UILabel.Wrap ( string  text,
out string  final,
int  height 
)

Convenience function – wrap the current text given the label's settings and the given height.

Member Data Documentation

Crispness UILabel.keepCrispWhenShrunk = Crispness.OnDesktop

Whether the label will keep its content crisp even when shrunk. You may want to turn this off on mobile devices.

Property Documentation

Alignment UILabel.alignment
getset

Text alignment option.

UnityEngine.Object UILabel.ambigiousFont
getset

Ambiguous helper function.

bool UILabel.applyGradient
getset

Whether a gradient will be applied.

UIFont UILabel.bitmapFont
getset

Set the font used by this label.

int UILabel.defaultFontSize
get

Default font size.

override Vector4 UILabel.drawingDimensions
get

Process the label's text before returning its drawing dimensions.

Color UILabel.effectColor
getset

Color used by the effect, if it's enabled.

Vector2 UILabel.effectDistance
getset

Effect distance in pixels.

Effect UILabel.effectStyle
getset

What effect is used by the label.

UIFont UILabel.font
getset
int UILabel.fontSize
getset

Active font size used by the label.

FontStyle UILabel.fontStyle
getset

Dynamic font style used by the label.

Color UILabel.gradientBottom
getset

Bottom gradient color.

Color UILabel.gradientTop
getset

Top gradient color.

override bool UILabel.isAnchoredHorizontally
get

Whether the rectangle is anchored horizontally.

override bool UILabel.isAnchoredVertically
get

Whether the rectangle is anchored vertically.

int UILabel.lineHeight
getset

Maximum height of the label in pixels.

int UILabel.lineWidth
getset

Maximum width of the label in pixels.

override Vector3 [] UILabel.localCorners
get

Process the label's text before returning its corners.

override Vector2 UILabel.localSize
get

Local size of the widget, in pixels.

override Material UILabel.material
getset

Retrieve the material used by the font.

int UILabel.maxLineCount
getset

The max number of lines to be displayed for the label

bool UILabel.multiLine
getset

Whether the label supports multiple lines.

Overflow UILabel.overflowMethod
getset

Overflow method controls the label's behaviour when its content doesn't fit the bounds.

Vector2 UILabel.printedSize
get

Actual printed size of the text, in pixels.

string UILabel.processedText
get

Returns the processed version of 'text', with new line characters, line wrapping, etc.

bool UILabel.shrinkToFit
getset

Whether the label will automatically shrink its size in order to fit the maximum line width.

int UILabel.spacingX
getset

Additional horizontal spacing between characters when printing text.

int UILabel.spacingY
getset

Additional vertical spacing between lines when printing text.

bool UILabel.supportEncoding
getset

Whether this label will support color encoding in the format of [RRGGBB] and new line in the form of a "\\n" string.

NGUIText.SymbolStyle UILabel.symbolStyle
getset

Style used for symbols.

string UILabel.text
getset

Text that's being displayed by the label.

Font UILabel.trueTypeFont
getset

Set the font used by this label.

override Vector3 [] UILabel.worldCorners
get

Process the label's text before returning its corners.


The documentation for this class was generated from the following file: