本文整理汇总了C++中CCProgressTimer::setColor方法的典型用法代码示例。如果您正苦于以下问题:C++ CCProgressTimer::setColor方法的具体用法?C++ CCProgressTimer::setColor怎么用?C++ CCProgressTimer::setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCProgressTimer
的用法示例。
在下文中一共展示了CCProgressTimer::setColor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setAttribute
void CCProgressTimerCreator::setAttribute(CCNode* pNode, const char* strName, const char* strValue, bool bCache)
{
if(bCache)
mAttrMap[strName] = strValue;
else
{
CCProgressTimer* pProgressTimer = (CCProgressTimer*)pNode;
if(strcmp(strName, "file") == 0 || strcmp(strName, "plist") == 0 )
return;
if(strcmp(strName, "type") == 0)
pProgressTimer->setType((CCProgressTimerType)ccXmlAttrParse::toInt(strValue));
if(strcmp(strName, "percent") == 0)
pProgressTimer->setPercentage(ccXmlAttrParse::toFloat(strValue));
if(strcmp(strName, "midpos") == 0)
pProgressTimer->setMidpoint(ccXmlAttrParse::toPoint(strValue));
if(strcmp(strName, "rate") == 0)
pProgressTimer->setBarChangeRate(ccXmlAttrParse::toPoint(strValue));
if(strcmp(strName, "reverse") == 0)
pProgressTimer->setReverseProgress(ccXmlAttrParse::toBool(strValue));
if(strcmp(strName, "anchor") == 0)
pProgressTimer->setAnchorPoint(ccXmlAttrParse::toPoint(strValue));
if(strcmp(strName, "color") == 0)
pProgressTimer->setColor(ccXmlAttrParse::toColor3B(strValue));
else
CCNodeRGBACreator::setAttribute(pNode, strName, strValue, bCache);
}
}