2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Label
|
2014-03-26 14:03:04 +08:00
|
|
|
-- @extend SpriteBatchNode,LabelProtocol
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-25 17:30:11 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-25 17:30:11 +08:00
|
|
|
-- @function [parent=#Label] isClipMarginEnabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enable shadow effect to Label.<br>
|
|
|
|
-- todo Support blur for shadow effect.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] enableShadow
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the untransformed size of the Label in a more efficient way.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setDimensions
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @param #float width
|
|
|
|
-- @param #float height
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Return the text the Label is displaying.
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] getString
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @param self
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @return string#string ret (return value: string)
|
2014-03-11 16:38:10 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] getHeight
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @return float#float ret (return value: float)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Disable all effect to Label.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] disableEffect
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-05-07 16:30:46 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets a new TTF configuration to Label.<br>
|
|
|
|
-- see `TTFConfig`
|
2014-05-07 16:30:46 +08:00
|
|
|
-- @function [parent=#Label] setTTFConfig
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc._ttfConfig ttfConfig
|
2014-05-07 16:30:46 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-21 15:01:27 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the text color of the Label.
|
2014-03-21 15:01:27 +08:00
|
|
|
-- @function [parent=#Label] getTextColor
|
|
|
|
-- @param self
|
2014-05-08 11:19:36 +08:00
|
|
|
-- @return color4b_table#color4b_table ret (return value: color4b_table)
|
2014-03-21 15:01:27 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Makes the Label exactly this untransformed width.<br>
|
|
|
|
-- The Label's width be used for text align if the value not equal zero.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setWidth
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @param #float width
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getMaxLineWidth
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @return float#float ret (return value: float)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the Label's text horizontal alignment.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getHorizontalAlignment
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-25 17:30:11 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Makes the Label to clip upper and lower margin for reduce height of Label.
|
2014-03-25 17:30:11 +08:00
|
|
|
-- @function [parent=#Label] setClipMarginEnabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool clipEnabled
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-25 17:30:11 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the text that this Label is to display.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setString
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string text
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets a new system font to Label.<br>
|
|
|
|
-- param font A font file or a font family name.<br>
|
|
|
|
-- warning
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] setSystemFontName
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2015-03-19 11:55:42 +08:00
|
|
|
-- @param #string font
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets a new bitmap font to Label
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setBMFontFilePath
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string bmfontFilePath
|
|
|
|
-- @param #vec2_table imageOffset
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
2014-03-27 16:43:46 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-27 16:43:46 +08:00
|
|
|
-- @function [parent=#Label] getFontAtlas
|
|
|
|
-- @param self
|
|
|
|
-- @return FontAtlas#FontAtlas ret (return value: cc.FontAtlas)
|
|
|
|
|
2014-06-19 15:22:49 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the line height of the Label.<br>
|
|
|
|
-- warning Not support system font.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v3.2.0
|
2014-06-19 15:22:49 +08:00
|
|
|
-- @function [parent=#Label] setLineHeight
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float height
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-06-19 15:22:49 +08:00
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] setSystemFontSize
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float fontSize
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-11 16:38:10 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Update content immediately.
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @function [parent=#Label] updateContent
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-11 16:38:10 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getStringLength
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Specify what happens when a line is too long for Label.<br>
|
|
|
|
-- param breakWithoutSpace Lines are automatically broken between words if this value is false.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setLineBreakWithoutSpace
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool breakWithoutSpace
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getStringNumLines
|
|
|
|
-- @param self
|
|
|
|
-- @return int#int ret (return value: int)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enable outline effect to Label.<br>
|
|
|
|
-- warning Limiting use to only when the Label created with true type font or system font.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] enableOutline
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table outlineColor
|
|
|
|
-- @param #int outlineSize
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-06-19 15:22:49 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the additional kerning of the Label.<br>
|
|
|
|
-- warning Not support system font.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v3.2.0
|
2014-06-19 15:22:49 +08:00
|
|
|
-- @function [parent=#Label] getAdditionalKerning
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Texture2D, int, int, int
|
|
|
|
-- @overload self, string, int, int, int
|
|
|
|
-- @overload self, string
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setCharMap
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string charMapFile
|
|
|
|
-- @param #int itemWidth
|
|
|
|
-- @param #int itemHeight
|
|
|
|
-- @param #int startCharMap
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @function [parent=#Label] getDimensions
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Makes the Label at most this line untransformed width.<br>
|
|
|
|
-- The Label's max line width be used for force line breaks if the value not equal zero.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setMaxLineWidth
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @param #float maxLineWidth
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-04-10 11:24:38 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the system font used by the Label.
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] getSystemFontName
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the Label's text vertical alignment.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setVerticalAlignment
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int vAlignment
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-11 16:38:10 +08:00
|
|
|
|
2014-06-19 15:22:49 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the line height of this Label.<br>
|
|
|
|
-- warning Not support system font.<br>
|
|
|
|
-- since v3.2.0
|
2014-06-19 15:22:49 +08:00
|
|
|
-- @function [parent=#Label] getLineHeight
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the TTF configuration object used by the Label.<br>
|
|
|
|
-- see `TTFConfig`
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] getTTFConfig
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @param self
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @return _ttfConfig#_ttfConfig ret (return value: cc._ttfConfig)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the Label's text vertical alignment.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getVerticalAlignment
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-21 15:01:27 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the text color of Label.<br>
|
|
|
|
-- The text color is different from the color of Node.<br>
|
|
|
|
-- warning Limiting use to only when the Label created with true type font or system font.
|
2014-03-21 15:01:27 +08:00
|
|
|
-- @function [parent=#Label] setTextColor
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table color
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-21 15:01:27 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Makes the Label exactly this untransformed height.<br>
|
|
|
|
-- The Label's height be used for text align if the value not equal zero.<br>
|
|
|
|
-- The text will display of incomplete when the size of Label not enough to support display all text.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setHeight
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @param #float height
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-19 09:56:50 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @function [parent=#Label] getWidth
|
|
|
|
-- @param self
|
2015-01-21 11:09:35 +08:00
|
|
|
-- @return float#float ret (return value: float)
|
2014-03-19 09:56:50 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Enable glow effect to Label.<br>
|
|
|
|
-- warning Limiting use to only when the Label created with true type font.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] enableGlow
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table glowColor
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Provides a way to treats each character like a Sprite.<br>
|
|
|
|
-- warning No support system font.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getLetter
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int lettetIndex
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
|
|
|
|
2014-06-19 15:22:49 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the additional kerning of the Label.<br>
|
|
|
|
-- warning Not support system font.<br>
|
2014-09-02 13:45:07 +08:00
|
|
|
-- since v3.2.0
|
2014-06-19 15:22:49 +08:00
|
|
|
-- @function [parent=#Label] setAdditionalKerning
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float space
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-06-19 15:22:49 +08:00
|
|
|
|
2014-04-10 11:24:38 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the bitmap font path used by the Label.
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] getSystemFontSize
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the Label's text horizontal alignment.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] getTextAlignment
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-19 09:56:50 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Returns the bitmap font used by the Label.
|
2014-03-19 09:56:50 +08:00
|
|
|
-- @function [parent=#Label] getBMFontFilePath
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Sets the Label's text horizontal alignment.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setHorizontalAlignment
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int hAlignment
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @overload self, int, int
|
|
|
|
-- @overload self, int
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] setAlignment
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int hAlignment
|
|
|
|
-- @param #int vAlignment
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-10-14 14:32:12 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- warning This method is not recommended for game developers.
|
2014-10-14 14:32:12 +08:00
|
|
|
-- @function [parent=#Label] requestSystemFontRefresh
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-10-14 14:32:12 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Allocates and initializes a Label, with a bitmap font file.<br>
|
|
|
|
-- param bmfontPath A bitmap font file, it's a FNT format.<br>
|
|
|
|
-- param text The initial text.<br>
|
|
|
|
-- param hAlignment Text horizontal alignment.<br>
|
|
|
|
-- param maxLineWidth The max line width.<br>
|
|
|
|
-- param imageOffset <br>
|
|
|
|
-- return An automatically released Label object.<br>
|
|
|
|
-- see setBMFontFilePath setMaxLineWidth
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] createWithBMFont
|
|
|
|
-- @param self
|
2015-03-19 11:55:42 +08:00
|
|
|
-- @param #string bmfontPath
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string text
|
2015-03-19 11:55:42 +08:00
|
|
|
-- @param #int hAlignment
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int maxLineWidth
|
|
|
|
-- @param #vec2_table imageOffset
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return Label#Label ret (return value: cc.Label)
|
|
|
|
|
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Allocates and initializes a Label, with default settings.<br>
|
|
|
|
-- return An automatically released Label object.
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] create
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @return Label#Label ret (return value: cc.Label)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, cc.Texture2D, int, int, int
|
|
|
|
-- @overload self, string, int, int, int
|
|
|
|
-- @overload self, string
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Label] createWithCharMap
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string charMapFile
|
|
|
|
-- @param #int itemWidth
|
|
|
|
-- @param #int itemHeight
|
|
|
|
-- @param #int startCharMap
|
2014-10-17 22:56:22 +08:00
|
|
|
-- @return Label#Label ret (return value: cc.Label)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-03-11 16:38:10 +08:00
|
|
|
--------------------------------
|
2015-03-19 11:55:42 +08:00
|
|
|
-- Allocates and initializes a Label, base on platform-dependent API.<br>
|
|
|
|
-- param text The initial text.<br>
|
|
|
|
-- param font A font file or a font family name.<br>
|
|
|
|
-- param fontSize The font size. This value must be > 0.<br>
|
|
|
|
-- param dimensions <br>
|
|
|
|
-- param hAlignment The text horizontal alignment.<br>
|
|
|
|
-- param vAlignment The text vertical alignment.<br>
|
|
|
|
-- warning It will generate texture by the platform-dependent code.<br>
|
|
|
|
-- return An automatically released Label object.
|
2014-04-10 11:24:38 +08:00
|
|
|
-- @function [parent=#Label] createWithSystemFont
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string text
|
|
|
|
-- @param #string font
|
|
|
|
-- @param #float fontSize
|
|
|
|
-- @param #size_table dimensions
|
|
|
|
-- @param #int hAlignment
|
|
|
|
-- @param #int vAlignment
|
2014-03-11 16:38:10 +08:00
|
|
|
-- @return Label#Label ret (return value: cc.Label)
|
|
|
|
|
2014-04-02 17:58:03 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-02 17:58:03 +08:00
|
|
|
-- @function [parent=#Label] draw
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table transform
|
|
|
|
-- @param #unsigned int flags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-04-02 17:58:03 +08:00
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] addChild
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Node child
|
|
|
|
-- @param #int zOrder
|
|
|
|
-- @param #int tag
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-02 17:58:03 +08:00
|
|
|
-- @function [parent=#Label] setScaleY
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scaleY
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] setScaleX
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scaleX
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] isOpacityModifyRGB
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] getScaleY
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
2014-03-31 16:52:27 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-31 16:52:27 +08:00
|
|
|
-- @function [parent=#Label] setBlendFunc
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.BlendFunc blendFunc
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-31 16:52:27 +08:00
|
|
|
|
2014-05-23 11:12:39 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-05-23 11:12:39 +08:00
|
|
|
-- @function [parent=#Label] visit
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Renderer renderer
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table parentTransform
|
|
|
|
-- @param #unsigned int parentFlags
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-05-23 11:12:39 +08:00
|
|
|
|
2014-04-02 17:58:03 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-02 17:58:03 +08:00
|
|
|
-- @function [parent=#Label] getScaleX
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-02 17:58:03 +08:00
|
|
|
-- @function [parent=#Label] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] setOpacityModifyRGB
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool isOpacityModifyRGB
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] setScale
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scale
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-04-01 10:09:55 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-01 10:09:55 +08:00
|
|
|
-- @function [parent=#Label] sortAllChildren
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-04-01 10:09:55 +08:00
|
|
|
|
2014-03-21 15:01:27 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-21 15:01:27 +08:00
|
|
|
-- @function [parent=#Label] updateDisplayedOpacity
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #unsigned char parentOpacity
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-21 15:01:27 +08:00
|
|
|
|
2014-03-18 15:55:30 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Label] getContentSize
|
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2014-03-28 16:20:29 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-28 16:20:29 +08:00
|
|
|
-- @function [parent=#Label] getBoundingBox
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
2014-03-19 14:14:23 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-19 14:14:23 +08:00
|
|
|
-- @function [parent=#Label] updateDisplayedColor
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color3b_table parentColor
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
2014-03-19 14:14:23 +08:00
|
|
|
|
2015-03-18 13:55:07 +08:00
|
|
|
--------------------------------
|
|
|
|
--
|
|
|
|
-- @function [parent=#Label] setCameraMask
|
|
|
|
-- @param self
|
|
|
|
-- @param #unsigned short mask
|
|
|
|
-- @param #bool applyChildren
|
|
|
|
-- @return Label#Label self (return value: cc.Label)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|