Class ccui.TextAtlas

Class Summary
Constructor Attributes Constructor Name and Description
 
The text atlas control of Cocos UI.

Method Summary

Class Detail

ccui.TextAtlas()
The text atlas control of Cocos UI.

Field Detail

<static> ccui.TextAtlas.RENDERER_ZORDER
The zOrder value of ccui.TextAtlas's renderer.
{String} string
- Content string of the label

Method Detail

  • <static> {ccui.TextAtlas} ccui.TextAtlas.create(stringValue, charMapFile, itemWidth, itemHeight, startCharMap)
    allocates and initializes a UILabelAtlas.
    Parameters:
    stringValue
    charMapFile
    itemWidth
    itemHeight
    startCharMap
    Deprecated:
    since v3.0, please use new ccui.TextAtlas() instead.
    Returns:
    {ccui.TextAtlas}
  • ctor(stringValue, charMapFile, itemWidth, itemHeight, startCharMap)
    Allocates and initializes a UILabelAtlas.
    Constructor of ccui.TextAtlas, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
    // example
    var uiLabelAtlas = new ccui.TextAtlas();
    Parameters:
    {String} stringValue
    {String} charMapFile
    {number} itemWidth
    {number} itemHeight
    {String} startCharMap
  • {string} getDescription()
    Returns the "class name" of ccui.TextAtlas.
    Returns:
    {string}
  • {String} getString()
    get string value for ui text atlas.
    Returns:
    {String}
  • {*|Number|long|int} getStringLength()
    Returns the length of string.
    Returns:
    {*|Number|long|int}
  • {String} getStringValue()
    get string value for text atlas.
    Deprecated:
    since v3.0, please use getString instead.
    Returns:
    {String}
  • {cc.Node} getVirtualRenderer()
    Returns the renderer of ccui.TextAtlas.
    Returns:
    {cc.Node}
  • {cc.Size} getVirtualRendererSize()
    Returns the renderer's content size
    Returns:
    {cc.Size}
  • setProperty(stringValue, charMapFile, itemWidth, itemHeight, startCharMap)
    initializes the UILabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas
    Parameters:
    {String} stringValue
    {String} charMapFile
    {number} itemWidth
    {number} itemHeight
    {String} startCharMap
  • setString(value)
    Sets string value for ui text atlas.
    Parameters:
    {String} value
  • setStringValue(value)
    Sets string value for text atlas.
    Parameters:
    {String} value
    Deprecated:
    since v3.0, please use setString instead.