cocos2d-x
2.2.3-gd2.113-rev1ec524e
|
RGBA protocol that affects CCNode's color and opacity NA. More...
#include <CCProtocols.h>
Public Member Functions | |
virtual void | setColor (const ccColor3B &color)=0 |
Changes the color with R,G,B bytes. More... | |
virtual const ccColor3B & | getColor (void)=0 |
Returns color that is currently used. More... | |
virtual const ccColor3B & | getDisplayedColor (void)=0 |
Returns the displayed color. More... | |
virtual GLubyte | getDisplayedOpacity (void)=0 |
Returns the displayed opacity. More... | |
virtual GLubyte | getOpacity (void)=0 |
Returns the opacity. More... | |
virtual void | setOpacity (GLubyte opacity)=0 |
Changes the opacity. More... | |
virtual void | setOpacityModifyRGB (bool bValue)=0 |
Changes the OpacityModifyRGB property. More... | |
virtual bool | isOpacityModifyRGB (void)=0 |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity) More... | |
virtual bool | isCascadeColorEnabled (void)=0 |
whether or not color should be propagated to its children. More... | |
virtual void | setCascadeColorEnabled (bool cascadeColorEnabled)=0 |
virtual void | updateDisplayedColor (const ccColor3B &color)=0 |
recursive method that updates display color More... | |
virtual bool | isCascadeOpacityEnabled (void)=0 |
whether or not opacity should be propagated to its children. More... | |
virtual void | setCascadeOpacityEnabled (bool cascadeOpacityEnabled)=0 |
virtual void | updateDisplayedOpacity (GLubyte opacity)=0 |
recursive method that updates the displayed opacity. More... | |
RGBA protocol that affects CCNode's color and opacity NA.
|
pure virtual |
Returns color that is currently used.
Implemented in CCLayerRGBA, CCScale9Sprite, CCAtlasNode, CCNodeRGBA, CCLabelBMFont, and CCControlButton.
|
pure virtual |
Returns the displayed color.
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
Returns the displayed opacity.
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
Returns the opacity.
The opacity which indicates how transparent or opaque this node is. 0 indicates fully transparent and 255 is fully opaque.
Implemented in CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, CCScale9Sprite, CCMotionStreak, and CCControlButton.
|
pure virtual |
whether or not color should be propagated to its children.
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
whether or not opacity should be propagated to its children.
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)
Implemented in CCAtlasNode, CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, CCControl, CCMenu, CCMotionStreak, CCSprite, and CCScale9Sprite.
|
pure virtual |
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
Implemented in CCNodeRGBA, CCLabelBMFont, and CCLayerRGBA.
|
pure virtual |
Changes the color with R,G,B bytes.
color | Example: ccc3(255,100,0) means R=255, G=100, B=0 |
Implemented in CCControlButton, CCAtlasNode, CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, CCLayerColor, CCProgressTimer, CCScale9Sprite, CCSprite, and CCControlColourPicker.
|
pure virtual |
Changes the opacity.
value | Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. |
Implemented in CCAtlasNode, CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, CCLayerColor, CCMotionStreak, CCProgressTimer, CCSprite, CCScale9Sprite, and CCControlButton.
|
pure virtual |
Changes the OpacityModifyRGB property.
If thie property is set to true, then the rendered color will be affected by opacity. Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255.
bValue | true then the opacity will be applied as: glColor(R,G,B,opacity); false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); |
Implemented in CCControl, CCNodeRGBA, CCLayerRGBA, CCMenu, CCMotionStreak, CCScale9Sprite, CCAtlasNode, CCLabelBMFont, and CCSprite.
|
pure virtual |
recursive method that updates display color
Implemented in CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, and CCSprite.
|
pure virtual |
recursive method that updates the displayed opacity.
Implemented in CCNodeRGBA, CCLabelBMFont, CCLayerRGBA, CCSprite, and CCScale9Sprite.