2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Text
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Widget
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module ccui
|
2014-03-18 15:55:30 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Enable shadow for the label<br>
|
|
|
|
-- todo support blur for shadow effect
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] enableShadow
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getFontSize
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getString
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return string#string ret (return value: string)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- disable shadow/outline/glow rendering
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] disableEffect
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
|
|
|
|
2014-06-09 15:30:49 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getTextColor
|
2014-06-09 15:30:49 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return color4b_table#color4b_table ret (return value: color4b_table)
|
2014-06-09 15:30:49 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setTextVerticalAlignment
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int alignment
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the font name of label.<br>
|
|
|
|
-- If you are trying to use a system font, you could just pass a font name<br>
|
|
|
|
-- If you are trying to use a TTF, you should pass a file path to the TTF file<br>
|
|
|
|
-- Usage: Text *text = Text::create("Hello", "Arial", 20);create a system font UIText<br>
|
|
|
|
-- text->setFontName("Marfelt"); it will change the font to system font no matter the previous font type is TTF or system font<br>
|
|
|
|
-- text->setFontName("xxxx/xxx.ttf");it will change the font to TTF font no matter the previous font type is TTF or system font<br>
|
|
|
|
-- param name font name.
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setFontName
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string name
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-06-09 15:30:49 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the touch scale enabled of label.<br>
|
|
|
|
-- param enabled touch scale enabled of label.
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setTouchScaleChangeEnabled
|
2014-06-09 15:30:49 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool enabled
|
2014-06-09 15:30:49 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-05-14 17:52:20 +08:00
|
|
|
-- @function [parent=#Text] setString
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string text
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the touch scale enabled of label.<br>
|
|
|
|
-- return touch scale enabled of label.
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] isTouchScaleChangeEnabled
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return bool#bool ret (return value: bool)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-05-14 10:03:18 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getFontName
|
2014-05-14 10:03:18 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return string#string ret (return value: string)
|
2014-05-14 10:03:18 +08:00
|
|
|
|
2014-06-09 15:30:49 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setTextAreaSize
|
|
|
|
-- @param self
|
|
|
|
-- @param #size_table size
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Gets the string length of the label.<br>
|
|
|
|
-- Note: This length will be larger than the raw string length,<br>
|
|
|
|
-- if you want to get the raw string length, you should call this->getString().size() instead<br>
|
|
|
|
-- return string length.
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getStringLength
|
|
|
|
-- @param self
|
|
|
|
-- @return long#long ret (return value: long)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Enable outline for the label<br>
|
|
|
|
-- It only works on IOS and Android when you use System fonts
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] enableOutline
|
2014-06-09 15:30:49 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table outlineColor
|
|
|
|
-- @param #int outlineSize
|
2014-06-09 15:30:49 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getType
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getTextHorizontalAlignment
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets the font size of label.<br>
|
|
|
|
-- param size font size.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Text] setFontSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int size
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setTextColor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table color
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- only support for TTF
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] enableGlow
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color4b_table glowColor
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-06-09 15:30:49 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getTextVerticalAlignment
|
2014-06-09 15:30:49 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return int#int ret (return value: int)
|
2014-06-09 15:30:49 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] getTextAreaSize
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-08-01 12:02:13 +08:00
|
|
|
-- @function [parent=#Text] setTextHorizontalAlignment
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #int alignment
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, string, string, int
|
|
|
|
-- @overload self
|
2014-04-04 18:45:34 +08:00
|
|
|
-- @function [parent=#Text] create
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string textContent
|
|
|
|
-- @param #string fontName
|
|
|
|
-- @param #int fontSize
|
2014-04-04 18:45:34 +08:00
|
|
|
-- @return Text#Text ret (retunr value: ccui.Text)
|
|
|
|
|
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=#Text] createInstance
|
|
|
|
-- @param self
|
|
|
|
-- @return Ref#Ref ret (return value: cc.Ref)
|
|
|
|
|
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=#Text] getVirtualRenderer
|
|
|
|
-- @param self
|
|
|
|
-- @return Node#Node ret (return value: cc.Node)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the "class name" of widget.
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Text] getDescription
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-04-18 10:51:14 +08:00
|
|
|
-- @function [parent=#Text] getVirtualRendererSize
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Default constructor
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Text] Text
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
return nil
|