void HelloWorld::updateBtn(const int tag) { CCMenuItemFont* b = (CCMenuItemFont*)pMenu->getChildByTag(tag); if (tag == RTBTNTAG) { b->setString((fnode && fnode->isRealTime()) ? "stop realtime upadte" : "update in realtime"); } else if (tag == SBTNTAG) { b->setString(fnode ? "hide filter" : "show filter"); } }
CCTableViewCell* TestList::tableCellAtIndex ( CCTableView* pTable, KDuint uIndex ) { CCTableViewCell* pCell = pTable->dequeueCell ( ); if ( !pCell ) { pCell = CCTableViewCell::create ( ); CCMenuItemFont* pItem = CCMenuItemFont::create ( l_pTestNames [ uIndex ] ); pCell->addChild ( pItem, 0, 1 ); pItem->setPosition ( ccpMid ( cellSizeForTable ( pTable ) ) ); } else { CCMenuItemFont* pItem = (CCMenuItemFont*) pCell->getChildByTag ( 1 ); pItem->setString ( l_pTestNames [ uIndex ] ); } return pCell; }