예제 #1
0
PopLayer* PopLayer::create(const string hanzi,const char* backgroundImage){
	PopLayer* l = PopLayer::create();
	l->setSpriteBackGround(CCSprite::create(backgroundImage));
	l->setSprite9BackGround(CCScale9Sprite::create(backgroundImage));
	l->setHanzi(hanzi);
	return l;
}
예제 #2
0
PopLayer* PopLayer::create(const char* backgroundImage)
{
    PopLayer* ml = PopLayer::create();
    ml->setSpriteBackGround(Sprite::create(backgroundImage));
    ml->setSprite9BackGround(Scale9Sprite::create(backgroundImage));
    return ml;
}
예제 #3
0
PopLayer* PopLayer::create(const Color4B& color)
{
    PopLayer *pRet = new PopLayer();
    if(pRet && pRet->initWithColor(color))
    {
        pRet->autorelease();
        return pRet;
    }
    CC_SAFE_DELETE(pRet);
    return NULL;
}
예제 #4
0
void MainScene::keyBackClicked(){
	if (CCDirector::sharedDirector()->getRunningScene()->getChildByTag(1001) == NULL) {
		PopLayer* exitDialog = PopLayer::create("strangedesign/Dlg_background_Appquit.png");
//		exitDialog->setContentSize(CCSizeMake(winSize.width*0.8,winSize.height*0.5));
//		exitDialog->setTitle("Exit",50);
//		exitDialog->setContentText("Are you sure to exit app!",60,100,150);
		exitDialog->setCallBackFunc(this,callfuncN_selector(MainScene::isExit));
		exitDialog->addButton("strangedesign/Dlg_appquit_ok_button_up.png","strangedesign/Dlg_appquit_ok_button_down.png","Y",0);
		exitDialog->addButton("strangedesign/Dlg_appquit_cancel_button_up.png","strangedesign/Dlg_appquit_cancel_button_down.png","N",1);
		CCDirector::sharedDirector()->getRunningScene()->addChild(exitDialog,100,TAG_LAYER_EXIT);
	}
}
예제 #5
0
void MazeScene::keyBackClicked()
{
	CCPoint pos = m_Player->getPosition();
	CCUserDefault::sharedUserDefault()->setDoubleForKey("xlabel", pos.x);			//存x轴y轴坐标
	CCUserDefault::sharedUserDefault()->setDoubleForKey("ylabel", pos.y);
	CCUserDefault::sharedUserDefault()->flush();
	//提交
	CCDirector::sharedDirector()->getKeypadDispatcher()->removeDelegate(this);
	PopLayer * poplayer = PopLayer::create();
	poplayer->setMazeKey(this);
	
	this->addChild(poplayer);
	
}