void SelectMenuView::onTouchUnlock(CCObject *pSender, TouchEventType type) { if(type == TOUCH_EVENT_ENDED) {playEffect(EFFECT_CLICK); UIButton* button = (UIButton*)pSender; if(strcmp(button->getName(),"panelLock_btn_back") == 0) { noticeUnlock(0); } else if(strcmp(button->getName(),"panelLock_btn_unlock") == 0) { _delegate->gotoUnlockBeauty(beautyTouched); } } }
void SelectMenuView::onTouchButton( CCObject* sender , TouchEventType type ) { UIButton* widget = static_cast<UIButton*>(sender); if( type == TOUCH_EVENT_ENDED ) {playEffect(EFFECT_CLICK); if(strcmp(widget->getName(),"Button_back") == 0) { _delegate->gotoMainMenu(); } else { _delegate->gotoBoss(); } CCLOG("touch %s",widget->getName()); } }
void UIStrengthen::gemButtonClicked( CCObject* sender, TouchEventType type ) { UIButton* button = (UIButton*)sender; for (int i = 0; i < 2; i++) { const char* s = CCString::createWithFormat("GemButton_%d", i+1)->getCString(); if (strcmp(button->getName(), s) == 0) { strengthenManager->selectGemId = i; refresh(); break; } } }
void UIStrengthen::equipmentButtonClicked( CCObject* sender, TouchEventType type ) { UIButton* button = (UIButton*)sender; for (int i = 0; i < 4; i++) { const char* s = CCString::createWithFormat("EquipmentButton_%d", i+1)->getCString(); if (strcmp(button->getName(), s) == 0) { selectFrameImageView->setPosition(button->getPosition()); strengthenManager->selectEquipmentId = strengthenManager->pageNum * 4 + i; refresh(); break; } } }