Class ccs.Label
- Defined in: UILabel.js
- Extends ccs.Widget
Constructor Attributes | Constructor Name and Description |
---|---|
Base class for ccs.Button
|
Method Summary
Class Detail
ccs.Label()
Base class for ccs.Button
Method Detail
-
allocates and initializes a UILabel.
// example var uiLabel = ccs.Label.create();
- Returns:
- {ccs.Label}
-
{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(point, y)override "setAnchorPoint" of widget.
- Parameters:
- {cc.Point|Number} point
- The anchor point of UILabel or The anchor point.x of UILabel.
- {Number} y Optional
- The anchor point.y of UILabel.
-
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