本文整理汇总了C++中CCLabelAtlas::autorelease方法的典型用法代码示例。如果您正苦于以下问题:C++ CCLabelAtlas::autorelease方法的具体用法?C++ CCLabelAtlas::autorelease怎么用?C++ CCLabelAtlas::autorelease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCLabelAtlas
的用法示例。
在下文中一共展示了CCLabelAtlas::autorelease方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
CCLabelAtlas* CCLabelAtlas::create(const char *string, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned int startCharMap)
{
CCLabelAtlas *pRet = new CCLabelAtlas();
if(pRet && pRet->initWithString(string, charMapFile, itemWidth, itemHeight, startCharMap))
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
示例2: CCLabelAtlas
//CCLabelAtlas - Creation & Init
CCLabelAtlas * CCLabelAtlas::labelWithString(const char *label, StreamSource* charMapSource, unsigned int itemWidth, int unsigned itemHeight, unsigned char startCharMap)
{
CCLabelAtlas *pRet = new CCLabelAtlas();
if(pRet && pRet->initWithString(label, charMapSource, itemWidth, itemHeight, startCharMap))
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet)
return NULL;
}
示例3: initFromString
bool CCMenuItemAtlasFont::initFromString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, SelectorProtocol* target, SEL_MenuHandler selector)
{
NSAssert( value != NULL && strlen(value) != 0, "value length must be greater than 0");
CCLabelAtlas *label = new CCLabelAtlas();
label->initWithString(value, charMapFile, itemWidth, itemHeight, startCharMap);
label->autorelease();
if (CCMenuItemLabel::initWithLabel(label, target, selector))
{
// do something ?
}
return true;
}
示例4: CCLabelAtlas
NS_CC_BEGIN
//CCLabelAtlas - Creation & Init
CCLabelAtlas * CCLabelAtlas::labelWithString(const char *label, const char *charMapFile, unsigned int itemWidth, int unsigned itemHeight, unsigned char startCharMap)
{
CCLabelAtlas *pRet = new CCLabelAtlas();
if(pRet && pRet->initWithString(label, charMapFile, itemWidth, itemHeight, startCharMap))
{
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}
示例5: CCLabelAtlas
NS_CC_BEGIN
//CCLabelAtlas - Creation & Init
CCLabelAtlas * CCLabelAtlas::create(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap, float space)
{
CCLabelAtlas *pRet = new CCLabelAtlas();
if(pRet)
{
pRet->m_space = space;
pRet->initWithString(string, charMapFile, itemWidth, itemHeight, startCharMap);
pRet->autorelease();
return pRet;
}
CC_SAFE_DELETE(pRet);
return NULL;
}