urMus - Audio and Media Interactions and Interfaces on Mobile Phones


urMus

API Documentation

TextLabel API

These functions are member functions of a TextLabel.

TextLabel:Font

Synopsis

fontFace = textlabel:Font()

Description

Returns the name of the typeface for the given font. Defaults to "Helvetica".

Returns

TextLabel:SetFont

Synopsis

textlabel:SetFont("fontName")

Description

Changes the given font for a textlabel.

Arguments

TextLabel:HorizontalAlign

Synopsis

hJustificationStatus = textlabel:HorizontalAlign()

Description

Returns the horizontal justification of a given textlabel.

Returns

TextLabel:SetHorizontalAlign

Synopsis

textlabel:SetHorizontalAlign("justifyH")

Description

Set the horizontal justification of a given textlabel.

Arguments

TextLabel:VerticalAlign

Synopsis

vJustificationStatus = textlabel:VerticalAlign()

Description

Returns the vertical justification of a given textlabel.

Returns

TextLabel:SetVerticalAlign

Synopsis

textlabel:SetVerticalAlign("vAlign")

Description

Set the horizontal justification of a given textlabel.

Arguments

TextLabel:ShadowColor

Synopsis

r, g, b, a = textlabel:ShadowColor()

Description

Returns the RGBA values for the given textlabel's shadow. Defaults to (0,0,0,128)

Returns

TextLabel:SetShadowColor

Synopsis

textlabel:SetShadowColor()
textlabel:SetShadowColor(r,g,b,a)

Description

Sets the RGBA values for the given textlabel shadow. If no argument is provided, this disables the shadow.

Arguments

TextLabel:ShadowOffset

Synopsis

x, y = textlabel:ShadowOffset()

Description

Returns the distance in pixels the textlabel's shadow deviates from the main textlabel body. Positive x is the to right of the textlabel while positive y is below. A textlabel defaults to a value is 0,0.

Returns

TextLabel:SetShadowOffset

Synopsis

textlabel:SetShadowOffset(x,y)

Description

Sets the distance in pixels the textlabel's shadow deviates from the main textlabel body. Positive x is the to right of the textlabel while positive y is below.

Arguments

TextLabel:ShadowBlur

Synopsis

blur = textlabel:ShadowBlur()

Description

Return the blur factor used for the text shadow.

Returns

TextLabel:SetShadowBlur

Synopsis

textlabel:SetShadowBlur(blur)

Arguments

Sets the blur factor to be used with the shadow. 0.0 means no blur, and the blur increases with size, roughly corresponding to pixel range.

TextLabel:Spacing

Synopsis

lineSpacing = textlabel:Spacing()

Description

Returns the line spacing in pixels between each successive line in a paragraph. of text.

Returns

TextLabel:SetSpacing

Synopsis

textlabel:SetSpacing()

Description

Sets the line spacing distance in pixels between successive lines in a paragraph.

Arguments

TextLabel:Color

Synopsis

r, g, b, a = textlabel:Color()

Description

Returns the RGBA values for the given textlabel text color. Defaults to (255,255,255,255).

Returns

TextLabel:SetColor

Description

See TextLabel:SetTextColor

TextLabel:SetTextColor

Synopsis

textlabel:SetTextColor(r,g,b,a)

Description

Sets the RGBA values for the given textlabel.

Arguments

TextLabel:Wrap

Synopsis

wrap = textlabel:Wrap()

Description

Describes how textlabel that exceeds the width of a region will be line-broken. Can be WORD, CHAR, or CLIP.

Returns

TextLabel:SetWrap

Synopsis

textlabel:SetWrap(wrap)

Description

Set the current line breaking mode for text lines that exceed the width of the region.

Arguments

TextLabel:Height

Synopsis

heightInPx = textlabel:Height()

Description

Returns the height of the given textlabel in pixels.

Returns

TextLabel:SetFontHeight

Synopsis

textlabel:SetFontHeight(height)

Description

Sets the rendering height of the current font in pixels.

Arguments

TextLabel:FontHeight

Synopsis

height = textlabel:SetFontHeight()

Description

Returns the rendering height of the current font in pixels.

Arguments

TextLabel:Width

Synopsis

widthInPx = textlabel:Width()

Returns

TextLabel:Label

Synopsis

text = textlabel:Label()

Description

Returns the current text value for this given textlabel.

Returns

TextLabel:SetLabel

Synopsis

textlabel:SetLabel("text")

Description

Sets the current text value for the given textlabel.

Arguments

TextLabel:SetRotation

Synopsis

textlabel:SetRotation(angle)

Description

Rotates the current text label. Note that alignment operations still assume that the orientation is 0 angle.

Arguments

TextLabel:Rotation

Synopsis

textlabel:Rotation()

Description

Returns the current rotation angle of the text label.

Returns

urMus API Overview