Class CCRGBAProtocol

#include <Geode/cocos/include/CCProtocols.h>
classCCRGBAProtocol{ ... }

RGBA protocol that affects CCNode’s color and opacity

Examples0
Public static methods0
Public member functions14
virtualvoidsetColor()=0

Changes the color with R,G,B bytes

Parameters

color

Example: ccc3(255,100,0) means R=255, G=100, B=0
virtualcocos2d::ccColor3Bconst&getColor()=0

Returns color that is currently used.

Return value
The ccColor3B contains R,G,B bytes.
virtualcocos2d::ccColor3Bconst&getDisplayedColor()=0

Returns the displayed color.

Return value
The ccColor3B contains R,G,B bytes.
virtual_::GLubytegetDisplayedOpacity()=0

Returns the displayed opacity.

Return value
The opacity of sprite, from 0 ~ 255
virtual_::GLubytegetOpacity()=0

Returns the opacity.

The opacity which indicates how transparent or opaque this node is. 0 indicates fully transparent and 255 is fully opaque.

Return value
The opacity of sprite, from 0 ~ 255
virtualvoidsetOpacity(
_::GLubyteopacity
)
=0

Changes the opacity.

Parameters

value

Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent.
virtualvoidsetOpacityModifyRGB(
boolbValue
)
=0

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.

Parameters

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);
virtualboolisOpacityModifyRGB()=0

Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity)

Return value
Returns opacity modify flag.
virtualboolisCascadeColorEnabled()=0

whether or not color should be propagated to its children.

virtualvoidsetCascadeColorEnabled(
boolcascadeColorEnabled
)
=0
No description provided
virtualvoidupdateDisplayedColor()=0

recursive method that updates display color

virtualboolisCascadeOpacityEnabled()=0

whether or not opacity should be propagated to its children.

virtualvoidsetCascadeOpacityEnabled(
boolcascadeOpacityEnabled
)
=0
No description provided
virtualvoidupdateDisplayedOpacity(
_::GLubyteopacity
)
=0

recursive method that updates the displayed opacity.

Fields0
Protected member functions0
Protected fields0