Class ccs.UILabel

Class Summary
Constructor Attributes Constructor Name and Description
 
Base class for ccs.UIButton

Method Summary

Class Detail

ccs.UILabel()
Base class for ccs.UIButton

Method Detail

  • <static> {ccs.UILabel} ccs.UILabel.create()
    allocates and initializes a UILabel.
    // example
    var uiLabel = ccs.UILabel.create();
    Returns:
    {ccs.UILabel}
  • {cc.Size} getContentSize()
    override "getContentSize" method of widget.
    Returns:
    {cc.Size}
  • {string} getDescription()
    Returns the "class name" of widget.
    Returns:
    {string}
  • {Number} getStringLength()
    Gets the string length of label.
    Returns:
    {Number}
  • {String} getStringValue()
    Gets the string value of label.
    Returns:
    {String}
  • {Boolean} getTouchScaleChangeAble()
    Gets the touch scale enabled of label.
    Returns:
    {Boolean}
  • {cc.Node} getVirtualRenderer()
    override "getVirtualRenderer" method of widget.
    Returns:
    {cc.Node}
  • {Boolean} isFlippedX()
    override "isFlippedX" of widget.
    Returns:
    {Boolean}
  • {Boolean} isFlippedY()
    override "isFlippedY" of widget.
    Returns:
    {Boolean}
  • {Boolean} isTouchScaleChangeEnabled()
    Gets the touch scale enabled of label.
    Returns:
    {Boolean}
  • setAnchorPoint(pt)
    override "setAnchorPoint" of widget.
    Parameters:
    {cc.Point} pt
  • setFlippedX(flipX)
    override "setFlippedX" of widget.
    Parameters:
    {Boolean} flipX
  • setFlippedY(flipY)
    override "setFlippedY" of widget.
    Parameters:
    {Boolean} flipY
  • setFontName(name)
    set fontName
    Parameters:
    {String} name
  • setFontSize(size)
    set fontSize
    Parameters:
    {Number} size
  • setScale(scale)
    set scale
    Parameters:
    {Number} scale
  • setScaleX(scaleX)
    set scaleX
    Parameters:
    {Number} scaleX
  • setScaleY(scaleY)
    set scaleY
    Parameters:
    {Number} scaleY
  • setText(text)
    Changes the string value of label.
    Parameters:
    {String} text
  • setTextAreaSize(size)
    set textAreaSize
    Parameters:
    {cc.Size} size
  • setTextHorizontalAlignment(alignment)
    set Horizontal Alignment of cc.LabelTTF
    Parameters:
    {cc.TEXT_ALIGNMENT_LEFT|cc.TEXT_ALIGNMENT_CENTER|cc.TEXT_ALIGNMENT_RIGHT} alignment
    Horizontal Alignment
  • setTextVerticalAlignment(verticalAlignment)
    set Vertical Alignment of cc.LabelTTF
    Parameters:
    {cc.VERTICAL_TEXT_ALIGNMENT_TOP|cc.VERTICAL_TEXT_ALIGNMENT_CENTER|cc.VERTICAL_TEXT_ALIGNMENT_BOTTOM} verticalAlignment
  • setTouchScaleChangeAble(enable)
    Sets the touch scale enabled of label.
    Parameters:
    {Boolean} enable
  • setTouchScaleChangeEnabled(enable)
    Sets the touch scale enabled of label.
    Parameters:
    {Boolean} enable