// *************************************************************************************** void CBotChatPageMission::begin() { CBotChatPage::begin(); CInterfaceManager *im = CInterfaceManager::getInstance(); // clear intro text im->getDbProp(BOT_CHAT_BASE_DB_PATH ":CHOOSE_MISSION")->setValue32(0); _MissionPagesObs.setMissionClientType(_MType); _MissionPagesObs.start(); // Select the Mission Aspect according to mission type im->getDbProp("UI:TEMP:MISSION:MISSION_TYPE")->setValue32(_MType); CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION)); if (gc) { // show the ui gc->setActive(true); // unselect any list CDBGroupListSheetText *buyListSheet = dynamic_cast<CDBGroupListSheetText *>(gc->getGroup("missions")); if (buyListSheet) { buyListSheet->unselect(); } } }
void execute (CCtrlBase * /* pCaller */, const std::string &sParams) { CInterfaceManager *im = CInterfaceManager::getInstance(); string receiver = getParam (sParams, "player"); if (receiver.empty()) return; CChatGroupWindow *pCGW = PeopleInterraction.getChatGroupWindow(); if (pCGW != NULL) { CGroupContainer *pGC = pCGW->createFreeTeller(receiver); if (pGC != NULL) pGC->setActive(true); CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(pGC->getGroup("eb")); if (eb) { CWidgetManager::getInstance()->setCaptureKeyboard(eb); } } }