mirror of https://github.com/axmolengine/axmol.git
parent
0dbda6c32d
commit
7be5cca13a
|
@ -28,10 +28,10 @@ bool AppDelegate::initCocos2d()
|
|||
pDirector->setDisplayFPS(true);
|
||||
|
||||
// set the ResourceEntry
|
||||
UIImage::setResourceEntry(&cocosTemplateResourceEntry);
|
||||
CCFileUtils::setResourceEntry(&cocosTemplateResourceEntry);
|
||||
|
||||
// set the Images ResInfo (name and ResID)
|
||||
UIImage::setImageResInfo(ResInfo, sizeof(ResInfo) / sizeof(T_ImageResInfo));
|
||||
CCFileUtils::setResourceInfo(ResInfo, sizeof(ResInfo) / sizeof(T_ResourceInfo));
|
||||
|
||||
// create a scene. it's an autorelease object
|
||||
CCScene *pScene = HelloWorld::scene();
|
||||
|
|
|
@ -34,8 +34,8 @@ bool HelloWorld::init()
|
|||
|
||||
// add a "close" icon to exit the progress. it's an autorelease object
|
||||
CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(
|
||||
(ResInfo[0]).ImgName.c_str(),
|
||||
(ResInfo[1]).ImgName.c_str(),
|
||||
(ResInfo[0]).ResName.c_str(),
|
||||
(ResInfo[1]).ResName.c_str(),
|
||||
this,
|
||||
menu_selector(HelloWorld::menuCloseCallback) );
|
||||
pCloseItem->setPosition( ccp(CCDirector::getSharedDirector()->getWinSize().width - 20, 20) );
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
using namespace cocos2d;
|
||||
|
||||
const T_ImageResInfo ResInfo[] =
|
||||
const T_ResourceInfo ResInfo[] =
|
||||
{
|
||||
{ "CloseNormal", COCOST_ID_BITMAP_CloseNormal },
|
||||
{ "CloseSelected", COCOST_ID_BITMAP_CloseSelected },
|
||||
|
|
Loading…
Reference in New Issue