Moai SDK
2.0
|
Function List | |
getColor | |
getFont | |
getScale | |
getSize | |
setColor | |
setFont | |
setShader | |
setPadding | |
setScale | |
setSize | |
Function List inherited from MOAINode | |
clearAttrLink | |
clearNodeLink | |
forceUpdate | |
getAttr | |
getAttrLink | |
getNodeState | |
moveAttr | |
scheduleUpdate | |
seekAttr | |
setAttrLink | |
setAttr | |
setNodeLink | |
Function List inherited from MOAIInstanceEventSource | |
getListener | |
setListener | |
|
Gets the color of the style.
function getColor ( MOAITextStyle self )
MOAITextStyle | self |
|
Gets the font of the style.
function getFont ( MOAITextStyle self )
MOAITextStyle | self |
|
Gets the scale of the style.
function getScale ( MOAITextStyle self )
MOAITextStyle | self |
|
Gets the size of the style.
function getSize ( MOAITextStyle self )
MOAITextStyle | self |
|
Initialize the style's color.
function setColor ( MOAITextStyle self, number r, number g, number b [, number a ] )
MOAITextStyle | self |
number | r Default value is 0. |
number | g Default value is 0. |
number | b Default value is 0. |
number | a Optional. Default value is 1. |
|
Sets or clears the style's font.
function setFont ( MOAITextStyle self [, MOAIFont font ] )
MOAITextStyle | self |
MOAIFont | font Optional. Default value is nil. |
|
Add padding to glyphs during layout. Padding does not affect placement of glyphs. Padding only causes more of the glyph and its underlying texture to be shown.
function setPadding ( MOAITextStyle self, number hPad, number vPad )
MOAITextStyle | self |
number | hPad glyph xMin -= hPad * 0.5, glyph xMax += hPad * 0.5 |
number | vPad glyph yMin -= vPad * 0.5, glyph yMax += vPad * 0.5 |
function setPadding ( MOAITextStyle self, xMinP glyph, yMinP glyph, xMaxP glyph, yMaxP glyph )
MOAITextStyle | self |
xMinP | glyph xMin -= xMinP |
yMinP | glyph yMin -= yMinP |
xMaxP | glyph xMax += xMaxP |
yMaxP | glyph yMax += yMaxP |
|
Sets the scale of the style. The scale is applied to any glyphs drawn using the style after the glyph set has been selected by size.
function setScale ( MOAITextStyle self [, number scale ] )
MOAITextStyle | self |
number | scale Optional. Default value is 1. |
|
Sets the shader for the text style to use.
function setShader ( MOAITextStyle self [, variant shader ] )
MOAITextStyle | self |
variant | shader Optional. Shader or shader preset. |
|
Sets or clears the style's size.
function setSize ( MOAITextStyle self, number points [, number dpi ] )
MOAITextStyle | self |
number | points The point size to be used by the style. |
number | dpi Optional. The device DPI (dots per inch of device screen). Default value is 72 (points same as pixels). |