예제 #1
0
void HeroBrowseScene::onClickBreakHero(CCObject* sender)
{
	UIWidget* pBut = (UIWidget*)sender;

	if(m_depot->IsDeckHero(m_slotElem[pBut->getTag()]._id)){
		KPopupLayer::DoModal(UI_WARNING_STR,NOTIFY_NO_DEL_DECKHERO,KPopupLayer::DT_Ok);
		return;
	}
	UIWidget* widget = (UIWidget*)sender;
	KPopupLayer::m_val = m_slotElem[pBut->getTag()]._id;
	KPopupLayer::DoModal(UI_WARNING_STR,NOTIFY_DEL_HERO,KPopupLayer::DT_Yes_No,coco_pushselector(HeroBrowseScene::DoBreakHero),this);
}
예제 #2
0
void HeroBrowseScene::onClickHeroLevUp(CCObject* sender)
{
	UIWidget* widget = (UIWidget*)sender;
	KHeroDef* pHeroDef = m_depot->FindHero(m_slotElem[widget->getTag()]._id);
	
	m_heroLevUpPanel.ShowPanel(pHeroDef);
}
예제 #3
0
void HeroBrowseScene::DoBreakHero(CCObject* sender)
{
	UIWidget* pBut = (UIWidget*)sender;
	if(pBut->getTag()==KPopupLayer::RT_YES){
		int stoneNum = m_depot->BreakHero(KPopupLayer::m_val);
		if(stoneNum>0){
			KPopupLayer::DoModal(UI_NOTIFY_STR,CAPTURE_HERO_CHIP,stoneNum,KPopupLayer::DT_Ok);
		}
		UpdateUI();
	}
}
예제 #4
0
void SelectMenuView::onTouchBeautyCard( CCObject* sender , TouchEventType type )
{
	UIWidget* widget = static_cast<UIWidget*>(sender);

	if( type == TOUCH_EVENT_ENDED )
	{playEffect(EFFECT_CLICK);
		int beautyIndex = widget->getTag() - CARD_TAG;
		if( beautyIndex < REAL_BEAUTY_NUM )
		{
			beautyTouched = beautyIndex;
			_delegate->gotoBeauty(beautyIndex);
		}
		CCLOG("touch %s",widget->getName());
	}
}
예제 #5
0
void StageSelectScene::DoClickStage(CCObject* sender)
{
	UIWidget* pBut = (UIWidget*)sender;
	StageWaitScene::SetSceneVal(scene_daily,pBut->getTag());
	KUIAssist::_switch2StageWaitScene();
}