axmol/cocos2dx/extensions/CCControlExtension/CCSpacer.cpp

24 lines
437 B
C++

#include "CCSpacer.h"
NS_CC_BEGIN
CCSpacer* CCSpacer::verticalSpacer(float space)
{
CCSpacer *pRet = new CCSpacer();
pRet->init();
pRet->setContentSize(CCSizeMake(0, space));
pRet->autorelease();
return pRet;
}
CCSpacer* CCSpacer::horizontalSpacer(float space)
{
CCSpacer *pRet = new CCSpacer();
pRet->init();
pRet->setContentSize(CCSizeMake(space, 0));
pRet->autorelease();
return pRet;
}
NS_CC_END