2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module Button
|
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
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] getTitleText
|
|
|
|
-- @param self
|
|
|
|
-- @return string#string ret (return value: string)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setTitleFontSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float size
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets if button is using scale9 renderer.<br>
|
|
|
|
-- param true that using scale9 renderer, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setScale9Enabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool able
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-08-15 15:23:17 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- brief Return a zoom scale
|
2014-08-15 15:23:17 +08:00
|
|
|
-- @function [parent=#Button] getZoomScale
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
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=#Button] getCapInsetsDisabledRenderer
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setTitleColor
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color3b_table color
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets capinsets for button, if button is using scale9 renderer.<br>
|
|
|
|
-- param capInsets capinsets for button
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setCapInsetsDisabledRenderer
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #rect_table capInsets
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets capinsets for button, if button is using scale9 renderer.<br>
|
|
|
|
-- param capInsets capinsets for button
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setCapInsets
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #rect_table capInsets
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Load dark state texture for button.<br>
|
|
|
|
-- param disabled dark state texture.<br>
|
|
|
|
-- param texType @see TextureResType
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] loadTextureDisabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string disabled
|
|
|
|
-- @param #int texType
|
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=#Button] setTitleText
|
|
|
|
-- @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
|
|
|
-- Sets capinsets for button, if button is using scale9 renderer.<br>
|
|
|
|
-- param capInsets capinsets for button
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setCapInsetsNormalRenderer
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #rect_table capInsets
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Load selected state texture for button.<br>
|
|
|
|
-- param selected selected state texture.<br>
|
|
|
|
-- param texType @see TextureResType
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] loadTexturePressed
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string selected
|
|
|
|
-- @param #int texType
|
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=#Button] setTitleFontName
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string fontName
|
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=#Button] getCapInsetsNormalRenderer
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] getCapInsetsPressedRenderer
|
|
|
|
-- @param self
|
|
|
|
-- @return rect_table#rect_table ret (return value: rect_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Load textures for button.<br>
|
|
|
|
-- param normal normal state texture name.<br>
|
|
|
|
-- param selected selected state texture name.<br>
|
|
|
|
-- param disabled disabled state texture name.<br>
|
|
|
|
-- param texType @see TextureResType
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] loadTextures
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string normal
|
|
|
|
-- @param #string selected
|
|
|
|
-- @param #string disabled
|
|
|
|
-- @param #int texType
|
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=#Button] isScale9Enabled
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Load normal state texture for button.<br>
|
|
|
|
-- param normal normal state texture.<br>
|
|
|
|
-- param texType @see TextureResType
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] loadTextureNormal
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string normal
|
|
|
|
-- @param #int texType
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Sets capinsets for button, if button is using scale9 renderer.<br>
|
|
|
|
-- param capInsets capinsets for button
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setCapInsetsPressedRenderer
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #rect_table capInsets
|
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=#Button] getTitleFontSize
|
|
|
|
-- @param self
|
|
|
|
-- @return float#float ret (return value: float)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] getTitleFontName
|
|
|
|
-- @param self
|
2014-04-04 18:45:34 +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
|
|
|
--
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] getTitleColor
|
|
|
|
-- @param self
|
2014-05-08 11:19:36 +08:00
|
|
|
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Changes if button can be clicked zoom effect.<br>
|
|
|
|
-- param true that can be clicked zoom effect, false otherwise.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#Button] setPressedActionEnabled
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool enabled
|
2014-03-10 14:04:58 +08:00
|
|
|
|
2014-08-15 15:23:17 +08:00
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- When user pressed the button, the button will zoom to a scale.<br>
|
|
|
|
-- The final scale of the button equals (button original scale + _zoomScale)
|
2014-08-15 15:23:17 +08:00
|
|
|
-- @function [parent=#Button] setZoomScale
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float scale
|
2014-08-15 15:23:17 +08:00
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
--------------------------------
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @overload self, string, string, string, int
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self
|
2014-04-04 18:45:34 +08:00
|
|
|
-- @function [parent=#Button] create
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string normalImage
|
|
|
|
-- @param #string selectedImage
|
|
|
|
-- @param #string disableImage
|
|
|
|
-- @param #int texType
|
2014-04-04 18:45:34 +08:00
|
|
|
-- @return Button#Button ret (retunr value: ccui.Button)
|
|
|
|
|
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=#Button] 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=#Button] 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=#Button] 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=#Button] getVirtualRendererSize
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @param self
|
|
|
|
-- @return size_table#size_table ret (return value: size_table)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
--
|
2014-03-18 15:55:30 +08:00
|
|
|
-- @function [parent=#Button] ignoreContentAdaptWithSize
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool ignore
|
2014-03-18 15:55:30 +08:00
|
|
|
|
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=#Button] Button
|
|
|
|
-- @param self
|
|
|
|
|
|
|
|
return nil
|