2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module ProgressTimer
|
2014-03-20 10:21:28 +08:00
|
|
|
-- @extend Node
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
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=#ProgressTimer] isReverseDirection
|
|
|
|
-- @param self
|
|
|
|
-- @return bool#bool ret (return value: bool)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- This allows the bar type to move the component at a specific rate<br>
|
|
|
|
-- Set the component to 0 to make sure it stays at 100%.<br>
|
|
|
|
-- For example you want a left to right bar but not have the height stay 100%<br>
|
|
|
|
-- Set the rate to be Vec2(0,1); and set the midpoint to = Vec2(0,.5f);
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] setBarChangeRate
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table barChangeRate
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Percentages are from 0 to 100
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] getPercentage
|
|
|
|
-- @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=#ProgressTimer] setSprite
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.Sprite sprite
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Change the percentage to change progress.
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] getType
|
|
|
|
-- @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-09-02 13:45:07 +08:00
|
|
|
-- The image to show the progress percentage, retain
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] getSprite
|
|
|
|
-- @param self
|
|
|
|
-- @return Sprite#Sprite ret (return value: cc.Sprite)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Midpoint is used to modify the progress start position.<br>
|
|
|
|
-- If you're using radials type then the midpoint changes the center point<br>
|
|
|
|
-- If you're using bar type the the midpoint changes the bar growth<br>
|
|
|
|
-- it expands from the center but clamps to the sprites edge so:<br>
|
|
|
|
-- you want a left to right then set the midpoint all the way to Vec2(0,y)<br>
|
|
|
|
-- you want a right to left then set the midpoint all the way to Vec2(1,y)<br>
|
|
|
|
-- you want a bottom to top then set the midpoint all the way to Vec2(x,0)<br>
|
|
|
|
-- you want a top to bottom then set the midpoint all the way to Vec2(x,1)
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] setMidpoint
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table point
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the BarChangeRate
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] getBarChangeRate
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-07-17 10:28:34 +08:00
|
|
|
-- @overload self, bool
|
|
|
|
-- @overload self, bool
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] setReverseDirection
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #bool reverse
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Returns the Midpoint
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] getMidpoint
|
|
|
|
-- @param self
|
2014-05-27 14:31:18 +08:00
|
|
|
-- @return vec2_table#vec2_table ret (return value: vec2_table)
|
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=#ProgressTimer] setPercentage
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #float percentage
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
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=#ProgressTimer] setType
|
|
|
|
-- @param self
|
2014-07-17 22:20:04 +08:00
|
|
|
-- @param #int type
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
2014-03-10 14:04:58 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- Creates a progress timer with the sprite as the shape the timer goes through
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @function [parent=#ProgressTimer] create
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #cc.Sprite sp
|
2014-03-10 14:04:58 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer ret (return value: cc.ProgressTimer)
|
|
|
|
|
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=#ProgressTimer] setAnchorPoint
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #vec2_table anchorPoint
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
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=#ProgressTimer] 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 ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
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=#ProgressTimer] setColor
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #color3b_table color
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
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=#ProgressTimer] getColor
|
|
|
|
-- @param self
|
2014-05-08 11:19:36 +08:00
|
|
|
-- @return color3b_table#color3b_table ret (return value: color3b_table)
|
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=#ProgressTimer] setOpacity
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #unsigned char opacity
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return ProgressTimer#ProgressTimer self (return value: cc.ProgressTimer)
|
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=#ProgressTimer] getOpacity
|
|
|
|
-- @param self
|
|
|
|
-- @return unsigned char#unsigned char ret (return value: unsigned char)
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
return nil
|