Class CCProgressTimer

#include <Geode/cocos/misc_nodes/CCProgressTimer.h>
classCCProgressTimer:publiccocos2d::CCNodeRGBA{ ... }

Since v0.99.1

CCProgressTimer is a subclass of CCNode. It renders the inner sprite according to the percentage. The progress can be Radial, Horizontal or vertical.

Examples0
Public static methods1
staticcocos2d::CCProgressTimer*create()

Creates a progress timer with the sprite as the shape the timer goes through

Public member functions20
cocos2d::CCProgressTimerTypegetType()

Change the percentage to change progress.

floatgetPercentage()

Percentages are from 0 to 100

cocos2d::CCSprite*getSprite()

The image to show the progress percentage, retain

boolinitWithSprite()

Initializes a progress timer with the sprite as the shape the timer goes through

voidsetPercentage(
floatfPercentage
)
No description provided
voidsetSprite()
No description provided
voidsetType()
No description provided
voidsetReverseProgress(
boolreverse
)
No description provided
virtualvoiddraw()
No description provided
voidsetAnchorPoint(
cocos2d::CCPointanchorPoint
)
No description provided
virtualvoidsetColor()
No description provided
virtualcocos2d::ccColor3Bconst&getColor()const
No description provided
virtual_::GLubytegetOpacity()const
No description provided
virtualvoidsetOpacity(
_::GLubyteopacity
)
No description provided
boolisReverseDirection()
No description provided
voidsetReverseDirection(
boolvalue
)
No description provided
virtualcocos2d::CCPointgetMidpoint()

Midpoint is used to modify the progress start position. If you’re using radials type then the midpoint changes the center point If you’re using bar type the the midpoint changes the bar growth it expands from the center but clamps to the sprites edge so: you want a left to right then set the midpoint all the way to ccp(0,y) you want a right to left then set the midpoint all the way to ccp(1,y) you want a bottom to top then set the midpoint all the way to ccp(x,0) you want a top to bottom then set the midpoint all the way to ccp(x,1)

virtualvoidsetMidpoint()

Midpoint is used to modify the progress start position. If you’re using radials type then the midpoint changes the center point If you’re using bar type the the midpoint changes the bar growth it expands from the center but clamps to the sprites edge so: you want a left to right then set the midpoint all the way to ccp(0,y) you want a right to left then set the midpoint all the way to ccp(1,y) you want a bottom to top then set the midpoint all the way to ccp(x,0) you want a top to bottom then set the midpoint all the way to ccp(x,1)

virtualcocos2d::CCPointgetBarChangeRate()const

This allows the bar type to move the component at a specific rate Set the component to 0 to make sure it stays at 100%. For example you want a left to right bar but not have the height stay 100% Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f);

virtualvoidsetBarChangeRate()

This allows the bar type to move the component at a specific rate Set the component to 0 to make sure it stays at 100%. For example you want a left to right bar but not have the height stay 100% Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f);

Fields1
boolm_bReverseDirection
;
No description provided
Protected member functions7
cocos2d::ccTex2FtextureCoordFromAlphaPoint()
No description provided
cocos2d::ccVertex2FvertexFromAlphaPoint()
No description provided
voidupdateProgress()
No description provided
voidupdateBar()
No description provided
voidupdateRadial()
No description provided
voidupdateColor()
No description provided
cocos2d::CCPointboundaryTexCoord(
charindex
)
No description provided
Protected fields7
;
No description provided
floatm_fPercentage
;
No description provided
;
No description provided
intm_nVertexDataCount
;
No description provided
;
No description provided
cocos2d::CCPointm_tMidpoint
;

Midpoint is used to modify the progress start position. If you’re using radials type then the midpoint changes the center point If you’re using bar type the the midpoint changes the bar growth it expands from the center but clamps to the sprites edge so: you want a left to right then set the midpoint all the way to ccp(0,y) you want a right to left then set the midpoint all the way to ccp(1,y) you want a bottom to top then set the midpoint all the way to ccp(x,0) you want a top to bottom then set the midpoint all the way to ccp(x,1)

cocos2d::CCPointm_tBarChangeRate
;

This allows the bar type to move the component at a specific rate Set the component to 0 to make sure it stays at 100%. For example you want a left to right bar but not have the height stay 100% Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f);