本文整理汇总了C++中CInterfaceManager::disableModalWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ CInterfaceManager::disableModalWindow方法的具体用法?C++ CInterfaceManager::disableModalWindow怎么用?C++ CInterfaceManager::disableModalWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CInterfaceManager
的用法示例。
在下文中一共展示了CInterfaceManager::disableModalWindow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: end
// *************************************************************************************************
void CBotChatPageDynamicMission::end()
{
// if a menu is currently poped, disable it
CInterfaceManager *im = CInterfaceManager::getInstance();
im->disableModalWindow();
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, false);
}
示例2: update
//.........这里部分代码省略.........
pElt->setActive(true);
}
// Browse the forum
pElt = pIM->getElementFromId(WIN_GUILD_FORUM":content:html");
if (pElt != NULL)
{
CGroupHTML *html = dynamic_cast<CGroupHTML*>(pElt);
if (html)
html->browse("home");
}
}
}
}
// *** Need to update Names?
if (_NeedUpdate)
{
bool bAllValid = true;
// Update wait until all the name of members, name of the guild and description are valid
if (!pSMC->getString (_Guild.NameID, _Guild.Name)) bAllValid = false;
for (uint i = 0; i < _GuildMembers.size(); ++i)
{
if (!pSMC->getString (_GuildMembers[i].NameID, _GuildMembers[i].Name)) bAllValid = false;
else _GuildMembers[i].Name = CEntityCL::removeTitleAndShardFromName(_GuildMembers[i].Name);
}
// If all is valid no more need update and if guild is opened update the interface
if (bAllValid)
{
// Search for UserEntity to find our own grade
if ((UserEntity != NULL) && (_GuildMembers.size() > 0))
{
uint i;
_Grade = EGSPD::CGuildGrade::Member;
string sUserName = strlwr(UserEntity->getEntityName().toString());
for (i = 0; i < _GuildMembers.size(); ++i)
{
if (strlwr(_GuildMembers[i].Name.toString()) == sUserName)
{
_Grade = _GuildMembers[i].Grade;
break;
}
}
}
// set this value in the database
pIM->getDbProp("UI:VARIABLES:USER:GUILD_GRADE")->setValue32(_Grade);
// update the guild display
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD));
if (pGuild != NULL)
{
// if the guild window is visible
if (pGuild->isOpen() && pGuild->getActive())
{
// Close the modal window if the member list will change
if(pIM->getModalWindow()!=NULL && _NeedUpdateMembers)
{
if (pIM->getModalWindow()->getId() == MENU_GUILD_MEMBER )
pIM->disableModalWindow();
}
// Rebuild interface. Rebuild members only if needed
pIM->runActionHandler("guild_sheet_open", NULL, toString("update_members=%d", (uint)_NeedUpdateMembers) );
}
}
// guild updated
_NeedUpdate = false;
_NeedUpdateMembers= false;
}
}
// *** Join proposal handling
if (_JoinPropUpdate)
{
bool bAllValid = true;
if (!pSMC->getDynString (_JoinPropPhraseID, _JoinPropPhrase)) bAllValid = false;
// If all is valid no more need update and update the interface
if (bAllValid)
{
_JoinPropUpdate = false;
CGroupContainer *pJoinProp = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_JOIN_PROPOSAL));
if (pJoinProp != NULL)
{
CViewText *pJoinPropPhraseView = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_JOIN_PROPOSAL_PHRASE));
if (pJoinPropPhraseView != NULL)
pJoinPropPhraseView->setText(_JoinPropPhrase);
pJoinProp->setActive(true);
pIM->setTopWindow(pJoinProp);
pJoinProp->updateCoords();
pJoinProp->center();
pJoinProp->enableBlink(2);
}
}
}
}