颜色的介绍
一、ccColor3B //ccColor3B predefined colors //! White color (255,255,255) static const ccColor3B ccWHITE={255,255,255}; //! Yellow color (255,255,0) static const ccColor3B ccYELLOW={255,255,0}; //! Blue color (0,0,255) static const ccColor3B ccBLUE={0,0,255}; //! Green Color (0,255,0) static const ccColor3B ccGREEN={0,255,0}; //! Red Color (255,0,0,) static const ccColor3B ccRED={255,0,0}; //! Magenta Color (255,0,255) static const ccColor3B ccMAGENTA={255,0,255}; //! Black Color (0,0,0) static const ccColor3B ccBLACK={0,0,0}; //! Orange Color (255,127,0) static const ccColor3B ccORANGE={255,127,0}; //! Gray Color (166,166,166) static const ccColor3B ccGRAY={166,166,166};
// 设置文字效果 2013-09-24 CCLabelTTF *wenzi = CCLabelTTF::create("Fuck ! Ship !","Tonburi",34); // 构造一个颜色 ccColor3B color; color.r = 255; color.g = 0; color.b = 0; // 设置字体颜色 wenzi->setColor(color); // 设置文字的透明度 wenzi->setOpacity(100); // 设置文字的位置 wenzi->setPosition(ccp(winSize.width / 2,winSize.height / 1.5)); this->addChild(wenzi,1);