mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-29 12:20:53 +00:00
CHANGED: #1471 Moved some more code from CInterfaceManager to CWidgetManager ( mostly widget lookup, modal handling, pointer, etc )
This commit is contained in:
parent
f898ae6b38
commit
27f2abaeb7
97 changed files with 1446 additions and 1470 deletions
|
@ -3318,7 +3318,7 @@ NLMISC_COMMAND(loadIntCfg, "load the interface config file","")
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->loadConfig ("save/interface.icfg");
|
im->loadConfig ("save/interface.icfg");
|
||||||
// reset the compass target
|
// reset the compass target
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId("ui:interface:compass"));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
|
||||||
if (gc && gc->isSavedTargetValid())
|
if (gc && gc->isSavedTargetValid())
|
||||||
{
|
{
|
||||||
gc->setTarget(gc->getSavedTarget());
|
gc->setTarget(gc->getSavedTarget());
|
||||||
|
@ -3341,7 +3341,7 @@ NLMISC_COMMAND(harvestDeposit, "harvest a deposit", "")
|
||||||
NetMngr.push(out);
|
NetMngr.push(out);
|
||||||
|
|
||||||
// open the interface
|
// open the interface
|
||||||
// CInterfaceManager::getInstance()->getWindowFromId("ui:interface:harvest")->setActive(true);
|
// CWidgetManager::getInstance()->getWindowFromId("ui:interface:harvest")->setActive(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nlwarning("command : unknown message name : 'HARVEST:DEPOSIT'");
|
nlwarning("command : unknown message name : 'HARVEST:DEPOSIT'");
|
||||||
|
@ -4960,7 +4960,7 @@ NLMISC_COMMAND(dumpUICoords, "Debug only : dump all coords info of an UI", "uiid
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *el= pIM->getElementFromId(args[0]);
|
CInterfaceElement *el= CWidgetManager::getInstance()->getElementFromId(args[0]);
|
||||||
if(!el)
|
if(!el)
|
||||||
{
|
{
|
||||||
pIM->displaySystemInfo(toString("dumpUICoords: '%s' does not exist", args[0].c_str()));
|
pIM->displaySystemInfo(toString("dumpUICoords: '%s' does not exist", args[0].c_str()));
|
||||||
|
@ -5497,7 +5497,7 @@ NLMISC_COMMAND(clear, "clear content of current char window", "<chat window call
|
||||||
CChatWindow *cw;
|
CChatWindow *cw;
|
||||||
if (args.size() == 1)
|
if (args.size() == 1)
|
||||||
{
|
{
|
||||||
cw = getChatWndMgr().getChatWindowFromCaller(dynamic_cast<CCtrlBase *>(im->getElementFromId(args[0])));
|
cw = getChatWndMgr().getChatWindowFromCaller(dynamic_cast<CCtrlBase *>(CWidgetManager::getInstance()->getElementFromId(args[0])));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -235,7 +235,7 @@ class CAHOnReloadTestPage: public IActionHandler
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// need to reset password and current screen
|
// need to reset password and current screen
|
||||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(GROUP_BROWSER));
|
||||||
|
|
||||||
pGH->browse(ClientCfg.TestBrowserUrl.c_str());
|
pGH->browse(ClientCfg.TestBrowserUrl.c_str());
|
||||||
|
|
||||||
|
@ -250,7 +250,7 @@ void initWebBrowser()
|
||||||
//NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
//NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||||
|
|
||||||
// start the browser
|
// start the browser
|
||||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(GROUP_BROWSER));
|
||||||
|
|
||||||
if (pGH)
|
if (pGH)
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ bool connection (const string &cookie, const string &fsaddr)
|
||||||
WaitServerAnswer = true;
|
WaitServerAnswer = true;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
pIM->activateMasterGroup ("ui:outgame", true);
|
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", true);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(ClientCfg.Local ? 6 : -1); // TMP TMP
|
||||||
IngameDbMngr.flushObserverCalls();
|
IngameDbMngr.flushObserverCalls();
|
||||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||||
|
@ -552,7 +552,7 @@ bool reconnection()
|
||||||
// Start the finite state machine
|
// Start the finite state machine
|
||||||
TInterfaceState InterfaceState = GLOBAL_MENU;
|
TInterfaceState InterfaceState = GLOBAL_MENU;
|
||||||
|
|
||||||
pIM->activateMasterGroup ("ui:outgame", true);
|
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", true);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(-1);
|
||||||
IngameDbMngr.flushObserverCalls();
|
IngameDbMngr.flushObserverCalls();
|
||||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||||
|
@ -825,7 +825,7 @@ void updateBGDownloaderUI()
|
||||||
static NLMISC::CRefPtr<CInterfaceElement> bgDownloaderWindow;
|
static NLMISC::CRefPtr<CInterfaceElement> bgDownloaderWindow;
|
||||||
if (!bgDownloaderWindow)
|
if (!bgDownloaderWindow)
|
||||||
{
|
{
|
||||||
bgDownloaderWindow = im->getElementFromId("ui:interface:bg_downloader");
|
bgDownloaderWindow = CWidgetManager::getInstance()->getElementFromId("ui:interface:bg_downloader");
|
||||||
}
|
}
|
||||||
bgWindowVisible = bgDownloaderWindow && bgDownloaderWindow->getActive();
|
bgWindowVisible = bgDownloaderWindow && bgDownloaderWindow->getActive();
|
||||||
}
|
}
|
||||||
|
@ -992,12 +992,12 @@ TInterfaceState globalMenu()
|
||||||
{
|
{
|
||||||
pIM->uninitOutGame();
|
pIM->uninitOutGame();
|
||||||
pIM->initOutGame();
|
pIM->initOutGame();
|
||||||
pIM->activateMasterGroup ("ui:outgame", true);
|
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", true);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(2); // TMP TMP
|
NLGUI::CDBManager::getInstance()->getDbProp ("UI:CURRENT_SCREEN")->setValue32(2); // TMP TMP
|
||||||
IngameDbMngr.flushObserverCalls();
|
IngameDbMngr.flushObserverCalls();
|
||||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||||
pIM->getElementFromId("ui:outgame:charsel")->setActive(false);
|
CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel")->setActive(false);
|
||||||
pIM->getElementFromId("ui:outgame:charsel")->setActive(true);
|
CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel")->setActive(true);
|
||||||
// Active inputs
|
// Active inputs
|
||||||
Actions.enable(true);
|
Actions.enable(true);
|
||||||
EditActions.enable(true);
|
EditActions.enable(true);
|
||||||
|
@ -1024,7 +1024,7 @@ TInterfaceState globalMenu()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Display the firewall alert string
|
// Display the firewall alert string
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:outgame:connecting:title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:outgame:connecting:title"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiFirewallAlert")+ucstring("..."));
|
pVT->setText(CI18N::get("uiFirewallAlert")+ucstring("..."));
|
||||||
|
|
||||||
|
@ -1229,7 +1229,7 @@ TInterfaceState globalMenu()
|
||||||
if ( firewallTimeout )
|
if ( firewallTimeout )
|
||||||
{
|
{
|
||||||
// Display the firewall error string instead of the normal failure string
|
// Display the firewall error string instead of the normal failure string
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:outgame:crashing:title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:outgame:crashing:title"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
pVT->setMultiLine( true );
|
pVT->setMultiLine( true );
|
||||||
|
@ -1300,7 +1300,7 @@ public:
|
||||||
for (i = 0; i < CharacterSummaries.size(); ++i)
|
for (i = 0; i < CharacterSummaries.size(); ++i)
|
||||||
{
|
{
|
||||||
CCharacterSummary &rCS = CharacterSummaries[i];
|
CCharacterSummary &rCS = CharacterSummaries[i];
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(sPath+":text"+NLMISC::toString(i));
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(sPath+":text"+NLMISC::toString(i));
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIE);
|
CViewText *pVT = dynamic_cast<CViewText*>(pIE);
|
||||||
if (pVT == NULL) return;
|
if (pVT == NULL) return;
|
||||||
|
|
||||||
|
@ -1312,7 +1312,7 @@ public:
|
||||||
// 5 slots
|
// 5 slots
|
||||||
for (; i < 5; ++i)
|
for (; i < 5; ++i)
|
||||||
{
|
{
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(sPath+":text"+NLMISC::toString(i)));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(sPath+":text"+NLMISC::toString(i)));
|
||||||
if (pVT == NULL) return;
|
if (pVT == NULL) return;
|
||||||
pVT->setText(CI18N::get("uiEmptySlot"));
|
pVT->setText(CI18N::get("uiEmptySlot"));
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1492,7 @@ public:
|
||||||
{
|
{
|
||||||
string sDBLink = getParam(Params, "dblink");
|
string sDBLink = getParam(Params, "dblink");
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(pCaller->getId(), sDBLink);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(pCaller->getId(), sDBLink);
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIE);
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIE);
|
||||||
if (pIG == NULL) return;
|
if (pIG == NULL) return;
|
||||||
|
|
||||||
|
@ -1662,7 +1662,7 @@ public:
|
||||||
string sEditBoxPath = getParam (Params, "name");
|
string sEditBoxPath = getParam (Params, "name");
|
||||||
ucstring sFirstName = ucstring("NotSet");
|
ucstring sFirstName = ucstring("NotSet");
|
||||||
ucstring sSurName = ucstring("NotSet");
|
ucstring sSurName = ucstring("NotSet");
|
||||||
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(sEditBoxPath));
|
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(sEditBoxPath));
|
||||||
if (pGEB != NULL)
|
if (pGEB != NULL)
|
||||||
sFirstName = pGEB->getInputString();
|
sFirstName = pGEB->getInputString();
|
||||||
else
|
else
|
||||||
|
@ -2118,7 +2118,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_MAINLAND));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND));
|
||||||
if (pList == NULL)
|
if (pList == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("element "GROUP_LIST_MAINLAND" not found probably bad outgame.xml");
|
nlwarning("element "GROUP_LIST_MAINLAND" not found probably bad outgame.xml");
|
||||||
|
@ -2175,7 +2175,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(GROUP_LIST_MAINLAND ":"+toString(Mainlands[defaultMainland].Id)+":but"));
|
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND ":"+toString(Mainlands[defaultMainland].Id)+":but"));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
{
|
{
|
||||||
pCB->setPushed(true);
|
pCB->setPushed(true);
|
||||||
|
@ -2196,7 +2196,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_MAINLAND));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND));
|
||||||
pList->clearGroups();
|
pList->clearGroups();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2216,7 +2216,7 @@ class CAHMainlandSelect : public IActionHandler
|
||||||
// Unselect
|
// Unselect
|
||||||
if (MainlandSelected.asInt() != 0)
|
if (MainlandSelected.asInt() != 0)
|
||||||
{
|
{
|
||||||
pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(GROUP_LIST_MAINLAND ":"+toString(MainlandSelected)+":but"));
|
pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_MAINLAND ":"+toString(MainlandSelected)+":but"));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
pCB->setPushed(false);
|
pCB->setPushed(false);
|
||||||
}
|
}
|
||||||
|
@ -2311,7 +2311,7 @@ public:
|
||||||
PrevLine = NULL;
|
PrevLine = NULL;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
List = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(GROUP_LIST_KEYSET));
|
List = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET));
|
||||||
if (List == NULL)
|
if (List == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("element "GROUP_LIST_KEYSET" not found probably bad outgame.xml");
|
nlwarning("element "GROUP_LIST_KEYSET" not found probably bad outgame.xml");
|
||||||
|
@ -2437,7 +2437,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_KEYSET));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET));
|
||||||
pList->clearGroups();
|
pList->clearGroups();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2476,7 +2476,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup * list = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(GROUP_LIST_KEYSET));
|
CInterfaceGroup * list = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_KEYSET));
|
||||||
if (list)
|
if (list)
|
||||||
{
|
{
|
||||||
CUnpush unpusher;
|
CUnpush unpusher;
|
||||||
|
@ -2635,7 +2635,7 @@ class CAHScenarioControl : public IActionHandler
|
||||||
nlinfo("CAHScenarioControl called");
|
nlinfo("CAHScenarioControl called");
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:r2ed_scenario_control"));
|
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_scenario_control"));
|
||||||
if(!scenarioWnd) return;
|
if(!scenarioWnd) return;
|
||||||
|
|
||||||
// -------- active some groups in function of Ryzom mode or Edition/Animation mode ----
|
// -------- active some groups in function of Ryzom mode or Edition/Animation mode ----
|
||||||
|
@ -2846,7 +2846,7 @@ class CAHScenarioInformation : public IActionHandler
|
||||||
nlinfo("CAHScenarioDescription called");
|
nlinfo("CAHScenarioDescription called");
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:r2ed_scenario_control"));
|
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_scenario_control"));
|
||||||
if(!scenarioWnd) return;
|
if(!scenarioWnd) return;
|
||||||
|
|
||||||
CInterfaceElement *result = scenarioWnd->findFromShortId(string("scenario_value_text"));
|
CInterfaceElement *result = scenarioWnd->findFromShortId(string("scenario_value_text"));
|
||||||
|
@ -2890,7 +2890,7 @@ class CAHHideCharsFilters : public IActionHandler
|
||||||
nlinfo("CAHHideCharsFilters called");
|
nlinfo("CAHHideCharsFilters called");
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:r2ed_scenario_control"));
|
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_scenario_control"));
|
||||||
if(!scenarioWnd) return;
|
if(!scenarioWnd) return;
|
||||||
|
|
||||||
bool lookingForPlayers = true;
|
bool lookingForPlayers = true;
|
||||||
|
@ -2937,7 +2937,7 @@ class CAHLoadScenario : public IActionHandler
|
||||||
nlinfo("CAHLoadScenario called");
|
nlinfo("CAHLoadScenario called");
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:r2ed_scenario_control"));
|
CInterfaceGroup* scenarioWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_scenario_control"));
|
||||||
if(!scenarioWnd) return;
|
if(!scenarioWnd) return;
|
||||||
|
|
||||||
CInterfaceElement *result = NULL;
|
CInterfaceElement *result = NULL;
|
||||||
|
@ -3226,7 +3226,7 @@ class CAHLoadScenario : public IActionHandler
|
||||||
bool noob = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool();
|
bool noob = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:IS_NEWBIE")->getValueBool();
|
||||||
if (FreeTrial && noob && (nevraxScenario != "1" || trialAllowed != "1"))
|
if (FreeTrial && noob && (nevraxScenario != "1" || trialAllowed != "1"))
|
||||||
{
|
{
|
||||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
||||||
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
||||||
|
@ -3307,7 +3307,7 @@ class CAHLoadScenario : public IActionHandler
|
||||||
|
|
||||||
if(sessionBrowser._LastInvokeResult == 14)
|
if(sessionBrowser._LastInvokeResult == 14)
|
||||||
{
|
{
|
||||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
||||||
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
||||||
|
@ -3336,7 +3336,7 @@ class CAHLoadScenario : public IActionHandler
|
||||||
|
|
||||||
if(sessionBrowser._LastInvokeResult == 14)
|
if(sessionBrowser._LastInvokeResult == 14)
|
||||||
{
|
{
|
||||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
|
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
|
||||||
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
|
||||||
|
@ -3406,7 +3406,7 @@ class CAHOpenRingSessions : public IActionHandler
|
||||||
if(!R2::getEditor().isInitialized())
|
if(!R2::getEditor().isInitialized())
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* ringSessionsWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:ring_sessions"));
|
CInterfaceGroup* ringSessionsWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:ring_sessions"));
|
||||||
if(!ringSessionsWnd) return;
|
if(!ringSessionsWnd) return;
|
||||||
ringSessionsWnd->setActive(true);
|
ringSessionsWnd->setActive(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ bool CContextualCursor::context(const std::string &contextName, float dist, cons
|
||||||
CInterfaceManager *IM = CInterfaceManager::getInstance();
|
CInterfaceManager *IM = CInterfaceManager::getInstance();
|
||||||
if(IM)
|
if(IM)
|
||||||
{
|
{
|
||||||
CViewPointer *cursor = IM->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
if (!functions.isString)
|
if (!functions.isString)
|
||||||
|
|
|
@ -368,10 +368,10 @@ void CContinentManager::select(const string &name, const CVectorD &pos, NLMISC::
|
||||||
if (pWS->Maps[i].ContinentName == name)
|
if (pWS->Maps[i].ContinentName == name)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (pMap != NULL)
|
if (pMap != NULL)
|
||||||
pMap->setMap(pWS->Maps[i].Name);
|
pMap->setMap(pWS->Maps[i].Name);
|
||||||
pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
||||||
if (pMap != NULL)
|
if (pMap != NULL)
|
||||||
pMap->setMap(pWS->Maps[i].Name);
|
pMap->setMap(pWS->Maps[i].Name);
|
||||||
break;
|
break;
|
||||||
|
@ -549,7 +549,7 @@ void CContinentManager::checkNumberOfUserLandmarks( uint maxNumber )
|
||||||
// Just cut down the last landmarks (in case of hacked file)
|
// Just cut down the last landmarks (in case of hacked file)
|
||||||
if ( cont == _Current )
|
if ( cont == _Current )
|
||||||
{
|
{
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CInterfaceManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if ( pMap )
|
if ( pMap )
|
||||||
pMap->removeExceedingUserLandMarks( maxNumber );
|
pMap->removeExceedingUserLandMarks( maxNumber );
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,7 @@ void checkUnderCursor()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = IM->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor == 0)
|
if(cursor == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -874,8 +874,8 @@ void contextWebPage(bool rightClick, bool dblClick)
|
||||||
void contextWebIG(bool rightClick, bool dblClick)
|
void contextWebIG(bool rightClick, bool dblClick)
|
||||||
{
|
{
|
||||||
CInterfaceManager *IM = CInterfaceManager::getInstance();
|
CInterfaceManager *IM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pGC = IM->getElementFromId("ui:interface:bot_chat_object");
|
CInterfaceElement *pGC = CWidgetManager::getInstance()->getElementFromId("ui:interface:bot_chat_object");
|
||||||
CInterface3DShape *el= dynamic_cast<CInterface3DShape*>(IM->getElementFromId("ui:interface:bot_chat_object:scene3d:object_1"));
|
CInterface3DShape *el= dynamic_cast<CInterface3DShape*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:bot_chat_object:scene3d:object_1"));
|
||||||
if (el != NULL)
|
if (el != NULL)
|
||||||
{
|
{
|
||||||
el->setName(selectedInstance.getShapeName());
|
el->setName(selectedInstance.getShapeName());
|
||||||
|
|
|
@ -132,7 +132,7 @@ public :
|
||||||
entity->updateMissionTarget();
|
entity->updateMissionTarget();
|
||||||
|
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId("ui:interface:compass"));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
|
||||||
// if new target title is not NULL, then show the compass and make it blink to indicate new location
|
// if new target title is not NULL, then show the compass and make it blink to indicate new location
|
||||||
// please note that the first time the player login, a target has not been saved in his config file, so
|
// please note that the first time the player login, a target has not been saved in his config file, so
|
||||||
// we permit the first (and only one) mission that is received to become the new compass direction (chiang the strong ...)
|
// we permit the first (and only one) mission that is received to become the new compass direction (chiang the strong ...)
|
||||||
|
@ -159,7 +159,7 @@ public :
|
||||||
if (leaf->getOldValue32() != 0)
|
if (leaf->getOldValue32() != 0)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *pGC = dynamic_cast<CGroupCompas*>(pIM->getElementFromId("ui:interface:compass"));
|
CGroupCompas *pGC = dynamic_cast<CGroupCompas*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("Can't retrieve compass group");
|
nlwarning("Can't retrieve compass group");
|
||||||
|
@ -198,7 +198,7 @@ public :
|
||||||
// {
|
// {
|
||||||
// _AlreadyReceived.insert(name);
|
// _AlreadyReceived.insert(name);
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId("ui:interface:compass"));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
|
||||||
if (!gc)
|
if (!gc)
|
||||||
{
|
{
|
||||||
nlwarning("Can't retrieve compass group");
|
nlwarning("Can't retrieve compass group");
|
||||||
|
@ -223,7 +223,7 @@ public :
|
||||||
gc->setTarget(ct);
|
gc->setTarget(ct);
|
||||||
gc->blink();
|
gc->blink();
|
||||||
gc->enableBlink(2);
|
gc->enableBlink(2);
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2331,10 +2331,10 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const ucstring &value)
|
||||||
if (_Slot == 0)
|
if (_Slot == 0)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:player:header_opened:player_title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
|
||||||
if (pVT != NULL) pVT->setText(_Title);
|
if (pVT != NULL) pVT->setText(_Title);
|
||||||
|
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:player"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player"));
|
||||||
if (pGC != NULL) pGC->setUCTitle(_EntityName);
|
if (pGC != NULL) pGC->setUCTitle(_EntityName);
|
||||||
|
|
||||||
CSkillManager *pSM = CSkillManager::getInstance();
|
CSkillManager *pSM = CSkillManager::getInstance();
|
||||||
|
|
|
@ -861,12 +861,12 @@ retryJoinEdit:
|
||||||
// pIM->runActionHandler( "proc", NULL, "charsel_disable_buttons" );
|
// pIM->runActionHandler( "proc", NULL, "charsel_disable_buttons" );
|
||||||
// pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:quit_but:active|value=1" );
|
// pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:quit_but:active|value=1" );
|
||||||
|
|
||||||
CInterfaceElement *btnOk = pIM->getElementFromId("ui:outgame:charsel:message_box:ok");
|
CInterfaceElement *btnOk = CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel:message_box:ok");
|
||||||
if (btnOk)
|
if (btnOk)
|
||||||
btnOk->setActive( ! requestRetToMainland );
|
btnOk->setActive( ! requestRetToMainland );
|
||||||
|
|
||||||
// Hide the black screen i.e. force showing the interface
|
// Hide the black screen i.e. force showing the interface
|
||||||
CInterfaceElement *charSelBlackScreen = pIM->getElementFromId("ui:outgame:charsel:black_screen");
|
CInterfaceElement *charSelBlackScreen = CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel:black_screen");
|
||||||
if (charSelBlackScreen)
|
if (charSelBlackScreen)
|
||||||
{
|
{
|
||||||
CViewBase *charSelBlackScreenBitmap = dynamic_cast<CViewBase*>(charSelBlackScreen);
|
CViewBase *charSelBlackScreenBitmap = dynamic_cast<CViewBase*>(charSelBlackScreen);
|
||||||
|
@ -928,7 +928,7 @@ retryJoinEdit:
|
||||||
pIM->runActionHandler( "proc", NULL, "charsel_enable_buttons" );
|
pIM->runActionHandler( "proc", NULL, "charsel_enable_buttons" );
|
||||||
pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:create_new_but:active|value=0" );
|
pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:create_new_but:active|value=0" );
|
||||||
|
|
||||||
CInterfaceGroup* charselGroup = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:outgame:charsel"));
|
CInterfaceGroup* charselGroup = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel"));
|
||||||
if(charselGroup)
|
if(charselGroup)
|
||||||
pIM->runActionHandler( "proc", charselGroup, "charsel_init_buttons" );
|
pIM->runActionHandler( "proc", charselGroup, "charsel_init_buttons" );
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ void CFogMap::getFogParams(float startDist, float endDist, float x, float y, flo
|
||||||
float ddMx = x;
|
float ddMx = x;
|
||||||
float ddMy = y;
|
float ddMy = y;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (gm && gm->isIsland())
|
if (gm && gm->isIsland())
|
||||||
{
|
{
|
||||||
CVector front = MainCam.getMatrix().getJ();
|
CVector front = MainCam.getMatrix().getJ();
|
||||||
|
|
|
@ -1187,8 +1187,8 @@ void initMainLoop()
|
||||||
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
ProgressBar.newMessage ( ClientCfg.buildLoadingString(nmsg) );
|
||||||
//CDebugInit dbg;
|
//CDebugInit dbg;
|
||||||
//dbg.init(&Driver->EventServer);
|
//dbg.init(&Driver->EventServer);
|
||||||
CInterfaceManager::getInstance()->activateMasterGroup("ui:login", false);
|
CWidgetManager::getInstance()->activateMasterGroup("ui:login", false);
|
||||||
CInterfaceManager::getInstance()->activateMasterGroup("ui:interface", true);
|
CWidgetManager::getInstance()->activateMasterGroup("ui:interface", true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1485,7 +1485,7 @@ void setLoadingContinent (CContinent *continent)
|
||||||
void initWelcomeWindow()
|
void initWelcomeWindow()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup* welcomeWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:welcome_info"));
|
CInterfaceGroup* welcomeWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:welcome_info"));
|
||||||
if(welcomeWnd)
|
if(welcomeWnd)
|
||||||
{
|
{
|
||||||
bool welcomeDbProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:WELCOME")->getValueBool();
|
bool welcomeDbProp = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:WELCOME")->getValueBool();
|
||||||
|
@ -1518,11 +1518,11 @@ void initHardwareCursor(bool secondCall)
|
||||||
// else, only the first time after this patch, open popup to propose hardare cursor mode
|
// else, only the first time after this patch, open popup to propose hardare cursor mode
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CInterfaceGroup * cursorWnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:hardware_cursor"));
|
CInterfaceGroup * cursorWnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:hardware_cursor"));
|
||||||
if(cursorWnd)
|
if(cursorWnd)
|
||||||
{
|
{
|
||||||
cursorWnd->setActive((sb.CurrentJoinMode!=CFarTP::LaunchEditor) || secondCall);
|
cursorWnd->setActive((sb.CurrentJoinMode!=CFarTP::LaunchEditor) || secondCall);
|
||||||
pIM->setTopWindow(cursorWnd);
|
CWidgetManager::getInstance()->setTopWindow(cursorWnd);
|
||||||
cursorWnd->updateCoords();
|
cursorWnd->updateCoords();
|
||||||
cursorWnd->center();
|
cursorWnd->center();
|
||||||
}
|
}
|
||||||
|
@ -1546,25 +1546,25 @@ void initBloomConfigUI()
|
||||||
bool supportBloom = Driver->supportBloomEffect();
|
bool supportBloom = Driver->supportBloomEffect();
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CCtrlBaseButton* button = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:bloom:c"));
|
CCtrlBaseButton* button = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:bloom:c"));
|
||||||
if(button)
|
if(button)
|
||||||
{
|
{
|
||||||
button->setFrozen(!supportBloom);
|
button->setFrozen(!supportBloom);
|
||||||
}
|
}
|
||||||
|
|
||||||
button = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:square_bloom:c"));
|
button = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:square_bloom:c"));
|
||||||
if(button)
|
if(button)
|
||||||
{
|
{
|
||||||
button->setFrozen(!supportBloom);
|
button->setFrozen(!supportBloom);
|
||||||
}
|
}
|
||||||
|
|
||||||
CCtrlScroll * scroll = dynamic_cast<CCtrlScroll*>(pIM->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:density_bloom:c"));
|
CCtrlScroll * scroll = dynamic_cast<CCtrlScroll*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_config:content:fx:bloom_gr:density_bloom:c"));
|
||||||
if(scroll)
|
if(scroll)
|
||||||
{
|
{
|
||||||
scroll->setFrozen(!supportBloom);
|
scroll->setFrozen(!supportBloom);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:game_config:content:fx:bloom_gr"));
|
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_config:content:fx:bloom_gr"));
|
||||||
|
|
||||||
if(!supportBloom)
|
if(!supportBloom)
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,7 +124,7 @@ bool InitMouseWithCursor (bool hardware)
|
||||||
{
|
{
|
||||||
Driver->showCursor(true);
|
Driver->showCursor(true);
|
||||||
|
|
||||||
CViewPointer *pointer = CInterfaceManager::getInstance()->getPointer();
|
CViewPointer *pointer = CWidgetManager::getInstance()->getPointer();
|
||||||
if (pointer)
|
if (pointer)
|
||||||
{
|
{
|
||||||
float x = (float)pointer->getX()/(float)Driver->getWindowWidth();
|
float x = (float)pointer->getX()/(float)Driver->getWindowWidth();
|
||||||
|
@ -145,7 +145,7 @@ bool InitMouseWithCursor (bool hardware)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIm = CInterfaceManager::getInstance();
|
CInterfaceManager *pIm = CInterfaceManager::getInstance();
|
||||||
CViewPointer *vp = pIm->getPointer();
|
CViewPointer *vp = CWidgetManager::getInstance()->getPointer();
|
||||||
Driver->showCursor(false);
|
Driver->showCursor(false);
|
||||||
SetMousePosFirstTime = false;
|
SetMousePosFirstTime = false;
|
||||||
if (vp)
|
if (vp)
|
||||||
|
@ -247,7 +247,7 @@ void SetMouseFreeLook ()
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
CViewPointer *pointer = im->getPointer();
|
CViewPointer *pointer = CWidgetManager::getInstance()->getPointer();
|
||||||
if (pointer)
|
if (pointer)
|
||||||
pointer->show (false);
|
pointer->show (false);
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ void SetMouseCursor (bool updatePos)
|
||||||
if (instance)
|
if (instance)
|
||||||
{
|
{
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = instance->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if (cursor)
|
if (cursor)
|
||||||
{
|
{
|
||||||
sint32 ix, iy;
|
sint32 ix, iy;
|
||||||
|
@ -319,7 +319,7 @@ void SetMouseCursor (bool updatePos)
|
||||||
if (instance)
|
if (instance)
|
||||||
{
|
{
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = instance->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if (cursor)
|
if (cursor)
|
||||||
{
|
{
|
||||||
cursor->setPointerPos(ix, iy);
|
cursor->setPointerPos(ix, iy);
|
||||||
|
@ -342,7 +342,7 @@ void SetMouseCursor (bool updatePos)
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
CViewPointer *pointer = im->getPointer();
|
CViewPointer *pointer = CWidgetManager::getInstance()->getPointer();
|
||||||
if (pointer)
|
if (pointer)
|
||||||
pointer->show (true);
|
pointer->show (true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,7 @@ public:
|
||||||
if (ig == NULL)
|
if (ig == NULL)
|
||||||
{
|
{
|
||||||
string elt = property.substr(0,property.rfind(':'));
|
string elt = property.substr(0,property.rfind(':'));
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(elt);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(elt);
|
||||||
ig = dynamic_cast<CInterfaceGroup*>(pIE);
|
ig = dynamic_cast<CInterfaceGroup*>(pIE);
|
||||||
if (ig == NULL && pIE != NULL)
|
if (ig == NULL && pIE != NULL)
|
||||||
ig = pIE->getParent();
|
ig = pIE->getParent();
|
||||||
|
@ -401,7 +401,7 @@ public:
|
||||||
sint32 limit;
|
sint32 limit;
|
||||||
fromString(getParam(Params, "limit"), limit);
|
fromString(getParam(Params, "limit"), limit);
|
||||||
|
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId (pCaller->getId(), elt);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId (pCaller->getId(), elt);
|
||||||
if (pIE == NULL) return;
|
if (pIE == NULL) return;
|
||||||
|
|
||||||
sint32 newW = pIE->getW();
|
sint32 newW = pIE->getW();
|
||||||
|
@ -432,9 +432,9 @@ public:
|
||||||
string target = getParam (Params, "target");
|
string target = getParam (Params, "target");
|
||||||
CGroupEditBox *geb;
|
CGroupEditBox *geb;
|
||||||
if (pCaller == NULL)
|
if (pCaller == NULL)
|
||||||
geb = dynamic_cast<CGroupEditBox *>(pIM->getElementFromId (target));
|
geb = dynamic_cast<CGroupEditBox *>(CWidgetManager::getInstance()->getElementFromId (target));
|
||||||
else
|
else
|
||||||
geb = dynamic_cast<CGroupEditBox *>(pIM->getElementFromId (pCaller->getId(), target));
|
geb = dynamic_cast<CGroupEditBox *>(CWidgetManager::getInstance()->getElementFromId (pCaller->getId(), target));
|
||||||
if (geb == NULL)
|
if (geb == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("<CAHSetKeyboardFocus::execute> Can't get target edit box %s, or bad type", target.c_str());
|
nlwarning("<CAHSetKeyboardFocus::execute> Can't get target edit box %s, or bad type", target.c_str());
|
||||||
|
@ -514,7 +514,7 @@ class CAHActiveMenu : public IActionHandler
|
||||||
// open the menu
|
// open the menu
|
||||||
if (CDBCtrlSheet::getDraggedSheet() == NULL)
|
if (CDBCtrlSheet::getDraggedSheet() == NULL)
|
||||||
{
|
{
|
||||||
CInterfaceManager::getInstance()->enableModalWindow (pCaller, getParam(Params, "menu"));
|
CWidgetManager::getInstance()->enableModalWindow (pCaller, getParam(Params, "menu"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -541,9 +541,9 @@ class CAHSetServerString : public IActionHandler
|
||||||
string elt = sTarget.substr(0,sTarget.rfind(':'));
|
string elt = sTarget.substr(0,sTarget.rfind(':'));
|
||||||
CInterfaceElement *pIE;
|
CInterfaceElement *pIE;
|
||||||
if (pCaller != NULL)
|
if (pCaller != NULL)
|
||||||
pIE = pIM->getElementFromId(pCaller->getId(), elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(pCaller->getId(), elt);
|
||||||
else
|
else
|
||||||
pIE = pIM->getElementFromId(elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(elt);
|
||||||
if (pIE == NULL) return;
|
if (pIE == NULL) return;
|
||||||
sTarget = pIE->getId() + ":" + sTarget.substr(sTarget.rfind(':')+1,sTarget.size());
|
sTarget = pIE->getId() + ":" + sTarget.substr(sTarget.rfind(':')+1,sTarget.size());
|
||||||
}
|
}
|
||||||
|
@ -581,9 +581,9 @@ class CAHSetServerID : public IActionHandler
|
||||||
string elt = sTarget.substr(0,sTarget.rfind(':'));
|
string elt = sTarget.substr(0,sTarget.rfind(':'));
|
||||||
CInterfaceElement *pIE;
|
CInterfaceElement *pIE;
|
||||||
if (pCaller != NULL)
|
if (pCaller != NULL)
|
||||||
pIE = pIM->getElementFromId(pCaller->getId(), elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(pCaller->getId(), elt);
|
||||||
else
|
else
|
||||||
pIE = pIM->getElementFromId(elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(elt);
|
||||||
if (pIE == NULL) return;
|
if (pIE == NULL) return;
|
||||||
sTarget = pIE->getId() + ":" + sTarget.substr(sTarget.rfind(':')+1,sTarget.size());
|
sTarget = pIE->getId() + ":" + sTarget.substr(sTarget.rfind(':')+1,sTarget.size());
|
||||||
}
|
}
|
||||||
|
@ -626,9 +626,9 @@ class CAHResetCamera : public IActionHandler
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE;
|
CInterfaceElement *pIE;
|
||||||
if (pCaller != NULL)
|
if (pCaller != NULL)
|
||||||
pIE = pIM->getElementFromId(pCaller->getId(), sTarget);
|
pIE = CWidgetManager::getInstance()->getElementFromId(pCaller->getId(), sTarget);
|
||||||
else
|
else
|
||||||
pIE = pIM->getElementFromId(sTarget);
|
pIE = CWidgetManager::getInstance()->getElementFromId(sTarget);
|
||||||
CInterface3DCamera *pCam = dynamic_cast<CInterface3DCamera*>(pIE);
|
CInterface3DCamera *pCam = dynamic_cast<CInterface3DCamera*>(pIE);
|
||||||
if (pCam == NULL) return;
|
if (pCam == NULL) return;
|
||||||
pCam->reset();
|
pCam->reset();
|
||||||
|
@ -726,7 +726,7 @@ public:
|
||||||
// Enable 'use global alpha' button
|
// Enable 'use global alpha' button
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(gc->isUsingGlobalAlpha() ? 0 : 1);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER_ALPHA")->setValue64(gc->isUsingGlobalAlpha() ? 0 : 1);
|
||||||
// show the modal box
|
// show the modal box
|
||||||
im->enableModalWindow(gc, "ui:interface:define_ui_transparency");
|
CWidgetManager::getInstance()->enableModalWindow(gc, "ui:interface:define_ui_transparency");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -819,7 +819,7 @@ class CAHSetTransparent : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(Params));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
{
|
{
|
||||||
pGC->setUseGlobalAlpha(false);
|
pGC->setUseGlobalAlpha(false);
|
||||||
|
@ -844,7 +844,7 @@ class CAHSetAlpha : public IActionHandler
|
||||||
uint8 alpha;
|
uint8 alpha;
|
||||||
fromString(getParam (Params, "alpha"), alpha);
|
fromString(getParam (Params, "alpha"), alpha);
|
||||||
|
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(ui));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(ui));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
{
|
{
|
||||||
pGC->setUseGlobalAlpha(false);
|
pGC->setUseGlobalAlpha(false);
|
||||||
|
@ -1033,7 +1033,7 @@ class CAHPopup : public IActionHandler
|
||||||
sCont = eVal.getString();
|
sCont = eVal.getString();
|
||||||
if (sCont.empty()) return;
|
if (sCont.empty()) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(sCont));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(sCont));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
if (pGC->isPopuped()) return;
|
if (pGC->isPopuped()) return;
|
||||||
pGC->setHighLighted(false);
|
pGC->setHighLighted(false);
|
||||||
|
|
|
@ -227,7 +227,7 @@ class CHandlerContextRingSessions : public IActionHandler
|
||||||
// when player go away)
|
// when player go away)
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId("ui:interface:ring_sessions");
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId("ui:interface:ring_sessions");
|
||||||
|
|
||||||
// check if selection is a Ring terminal
|
// check if selection is a Ring terminal
|
||||||
CEntityCL * selection = EntitiesMngr.entity(UserEntity->selection());
|
CEntityCL * selection = EntitiesMngr.entity(UserEntity->selection());
|
||||||
|
@ -1383,11 +1383,11 @@ void CSelectItemSheet::showItemFlags(CInterfaceManager *im,bool canUse,bool canB
|
||||||
if (!im) return;
|
if (!im) return;
|
||||||
CInterfaceGroup *gr;
|
CInterfaceGroup *gr;
|
||||||
#define BOT_CHAT_TRADE_PATH "ui:interface:bot_chat_trade:header_opened:trade_content:"
|
#define BOT_CHAT_TRADE_PATH "ui:interface:bot_chat_trade:header_opened:trade_content:"
|
||||||
gr = dynamic_cast<CInterfaceGroup *>( im->getElementFromId(BOT_CHAT_TRADE_PATH "cant_use_item"));
|
gr = dynamic_cast<CInterfaceGroup *>( CWidgetManager::getInstance()->getElementFromId(BOT_CHAT_TRADE_PATH "cant_use_item"));
|
||||||
if (gr) gr->setActive(!canUse);
|
if (gr) gr->setActive(!canUse);
|
||||||
gr = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(BOT_CHAT_TRADE_PATH "cant_use_built_item"));
|
gr = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(BOT_CHAT_TRADE_PATH "cant_use_built_item"));
|
||||||
if (gr) gr->setActive(!canUseBuiltItem);
|
if (gr) gr->setActive(!canUseBuiltItem);
|
||||||
gr = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(BOT_CHAT_TRADE_PATH "cant_build_item"));
|
gr = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(BOT_CHAT_TRADE_PATH "cant_build_item"));
|
||||||
if (gr) gr->setActive(!canBuild);
|
if (gr) gr->setActive(!canBuild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1671,7 +1671,7 @@ class CHandlerAnimalOpenInventory : public IActionHandler
|
||||||
if(animalIndex>=1 && animalIndex<=MAX_INVENTORY_ANIMAL)
|
if(animalIndex>=1 && animalIndex<=MAX_INVENTORY_ANIMAL)
|
||||||
{
|
{
|
||||||
// show/hide the inventory
|
// show/hide the inventory
|
||||||
CInterfaceElement *group= pIM->getElementFromId(toString("ui:interface:inv_pa%d", animalIndex-1) );
|
CInterfaceElement *group= CWidgetManager::getInstance()->getElementFromId(toString("ui:interface:inv_pa%d", animalIndex-1) );
|
||||||
|
|
||||||
if(group) group->setActive(!group->getActive());
|
if(group) group->setActive(!group->getActive());
|
||||||
}
|
}
|
||||||
|
@ -1687,7 +1687,7 @@ REGISTER_ACTION_HANDLER( CHandlerAnimalOpenInventory, "animal_open_inventory" );
|
||||||
static void closeGroup(const string &groupName)
|
static void closeGroup(const string &groupName)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(groupName));
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(groupName));
|
||||||
if (pIG == NULL) return;
|
if (pIG == NULL) return;
|
||||||
pIG->setActive(false);
|
pIG->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -1883,7 +1883,7 @@ public:
|
||||||
helpContainer = "ui:interface:help_browser";
|
helpContainer = "ui:interface:help_browser";
|
||||||
|
|
||||||
// open the help browser
|
// open the help browser
|
||||||
CInterfaceElement *pIG= pIM->getElementFromId(helpContainer);
|
CInterfaceElement *pIG= CWidgetManager::getInstance()->getElementFromId(helpContainer);
|
||||||
if(pIG)
|
if(pIG)
|
||||||
pIG->setActive(true);
|
pIG->setActive(true);
|
||||||
|
|
||||||
|
@ -1907,9 +1907,9 @@ static bool findInterfacePath(string &sPath, CCtrlBase *pCaller)
|
||||||
string elt = sPath.substr(0,sPath.rfind(':'));
|
string elt = sPath.substr(0,sPath.rfind(':'));
|
||||||
CInterfaceElement *pIE;
|
CInterfaceElement *pIE;
|
||||||
if (pCaller != NULL)
|
if (pCaller != NULL)
|
||||||
pIE = pIM->getElementFromId(pCaller->getId(), elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(pCaller->getId(), elt);
|
||||||
else
|
else
|
||||||
pIE = pIM->getElementFromId(elt);
|
pIE = CWidgetManager::getInstance()->getElementFromId(elt);
|
||||||
if (pIE == NULL) return false;
|
if (pIE == NULL) return false;
|
||||||
sPath = pIE->getId() + ":" + sPath.substr(sPath.rfind(':')+1,sPath.size());
|
sPath = pIE->getId() + ":" + sPath.substr(sPath.rfind(':')+1,sPath.size());
|
||||||
}
|
}
|
||||||
|
@ -2071,17 +2071,17 @@ class CActionHandlerSetTargetForceRegionLevel: public IActionHandler
|
||||||
// Access UI elements
|
// Access UI elements
|
||||||
if (sSlot.empty()) return;
|
if (sSlot.empty()) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewBitmap *pVBR = dynamic_cast<CViewBitmap*>(pIM->getElementFromId(sTargetRegion));
|
CViewBitmap *pVBR = dynamic_cast<CViewBitmap*>(CWidgetManager::getInstance()->getElementFromId(sTargetRegion));
|
||||||
if (pVBR == NULL)
|
if (pVBR == NULL)
|
||||||
return;
|
return;
|
||||||
CViewBitmap *pVBL = dynamic_cast<CViewBitmap*>(pIM->getElementFromId(sTargetLevel));
|
CViewBitmap *pVBL = dynamic_cast<CViewBitmap*>(CWidgetManager::getInstance()->getElementFromId(sTargetLevel));
|
||||||
if (pVBL == NULL)
|
if (pVBL == NULL)
|
||||||
return;
|
return;
|
||||||
CInterfaceExprValue evValue;
|
CInterfaceExprValue evValue;
|
||||||
if (!CInterfaceExpr::eval(sSlot, evValue, NULL))
|
if (!CInterfaceExpr::eval(sSlot, evValue, NULL))
|
||||||
return;
|
return;
|
||||||
sint32 nSlot = (sint32)evValue.getInteger();
|
sint32 nSlot = (sint32)evValue.getInteger();
|
||||||
CCtrlBase *pTooltip = dynamic_cast<CCtrlBase*>(pIM->getElementFromId("ui:interface:target:header_opened:force"));
|
CCtrlBase *pTooltip = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:target:header_opened:force"));
|
||||||
|
|
||||||
// Access target entity
|
// Access target entity
|
||||||
CEntityCL *pE = NULL;
|
CEntityCL *pE = NULL;
|
||||||
|
@ -2167,7 +2167,7 @@ class CActionHandlerSetTargetForceRegionLevel: public IActionHandler
|
||||||
pVBL->setTexture(sTexture);
|
pVBL->setTexture(sTexture);
|
||||||
|
|
||||||
// Set tooltip
|
// Set tooltip
|
||||||
CCtrlBase *tooltip = dynamic_cast<CCtrlBase*>(pIM->getElementFromId("ui:interface:target:header_opened:force"));
|
CCtrlBase *tooltip = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:target:header_opened:force"));
|
||||||
if (tooltip)
|
if (tooltip)
|
||||||
{
|
{
|
||||||
ucstring str;
|
ucstring str;
|
||||||
|
@ -2750,13 +2750,13 @@ public:
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:gestion_windows"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:gestion_windows"));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("gestion_windows not found as a container");
|
nlwarning("gestion_windows not found as a container");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId("ui:interface:gestion_windows:close");
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId("ui:interface:gestion_windows:close");
|
||||||
if (pIE != NULL) pIE->setActive(false);
|
if (pIE != NULL) pIE->setActive(false);
|
||||||
|
|
||||||
CActionsManager *pAM = &Actions;
|
CActionsManager *pAM = &Actions;
|
||||||
|
@ -2783,7 +2783,7 @@ public:
|
||||||
// Show the container
|
// Show the container
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
// Yoyo: important to setTopWindow ONLY if needed, else save of the TopWindow doesn't work when you switch it.
|
// Yoyo: important to setTopWindow ONLY if needed, else save of the TopWindow doesn't work when you switch it.
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2837,7 +2837,7 @@ class CHandlerCloseAllLabosBut : public IActionHandler
|
||||||
// if not the excluded one
|
// if not the excluded one
|
||||||
if( Params != laboWindows[i] )
|
if( Params != laboWindows[i] )
|
||||||
{
|
{
|
||||||
CInterfaceElement *pElt= pIM->getElementFromId(laboWindows[i]);
|
CInterfaceElement *pElt= CWidgetManager::getInstance()->getElementFromId(laboWindows[i]);
|
||||||
if(pElt)
|
if(pElt)
|
||||||
pElt->setActive(false);
|
pElt->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -2866,12 +2866,12 @@ class CHandlerToggleInventory : public IActionHandler
|
||||||
|
|
||||||
// For all labos
|
// For all labos
|
||||||
bool state = false;
|
bool state = false;
|
||||||
CInterfaceElement *pElt= pIM->getElementFromId(inventoryWindows[0]);
|
CInterfaceElement *pElt= CWidgetManager::getInstance()->getElementFromId(inventoryWindows[0]);
|
||||||
if (pElt)
|
if (pElt)
|
||||||
state = !pElt->getActive();
|
state = !pElt->getActive();
|
||||||
for(uint i=0;i<numWins;i++)
|
for(uint i=0;i<numWins;i++)
|
||||||
{
|
{
|
||||||
pElt= pIM->getElementFromId(inventoryWindows[i]);
|
pElt= CWidgetManager::getInstance()->getElementFromId(inventoryWindows[i]);
|
||||||
if(pElt)
|
if(pElt)
|
||||||
pElt->setActive(state);
|
pElt->setActive(state);
|
||||||
}
|
}
|
||||||
|
@ -2922,7 +2922,7 @@ public:
|
||||||
|
|
||||||
// Initialize interface combo box
|
// Initialize interface combo box
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -2934,7 +2934,7 @@ public:
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(-1);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->setValue32(nFoundMode);
|
||||||
|
|
||||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
||||||
if (pBut)
|
if (pBut)
|
||||||
{
|
{
|
||||||
if (ClientCfg.Windowed)
|
if (ClientCfg.Windowed)
|
||||||
|
@ -2946,7 +2946,7 @@ public:
|
||||||
|
|
||||||
// **** Init Texture Size Modes
|
// **** Init Texture Size Modes
|
||||||
// init the combo box, according to Texture Installed or not
|
// init the combo box, according to Texture Installed or not
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_TEXTURE_MODE_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_TEXTURE_MODE_COMBO ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -3008,7 +3008,7 @@ class CHandlerGameConfigMode : public IActionHandler
|
||||||
sint nVideModeNb = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
sint nVideModeNb = NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_MODE_DB )->getValue32();
|
||||||
if (nVideModeNb == -1) return;
|
if (nVideModeNb == -1) return;
|
||||||
|
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if( pCB == NULL ) return;
|
if( pCB == NULL ) return;
|
||||||
|
|
||||||
// Get W, H
|
// Get W, H
|
||||||
|
@ -3046,7 +3046,7 @@ class CHandlerGameConfigMode : public IActionHandler
|
||||||
}
|
}
|
||||||
if (nFoundFreq == -1) nFoundFreq = 0;
|
if (nFoundFreq == -1) nFoundFreq = 0;
|
||||||
// Initialize interface combo box
|
// Initialize interface combo box
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -3147,28 +3147,28 @@ class CHandlerGameConfigFullscreen : public IActionHandler
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
bool bFullscreen = false;
|
bool bFullscreen = false;
|
||||||
{
|
{
|
||||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
||||||
if (pBut) bFullscreen = pBut->getPushed();
|
if (pBut) bFullscreen = pBut->getPushed();
|
||||||
}
|
}
|
||||||
CDBGroupComboBox *pCB;
|
CDBGroupComboBox *pCB;
|
||||||
if (bFullscreen)
|
if (bFullscreen)
|
||||||
{
|
{
|
||||||
// show modes combo
|
// show modes combo
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if (pCB) pCB->setActive(true);
|
if (pCB) pCB->setActive(true);
|
||||||
|
|
||||||
// show frequencies combo
|
// show frequencies combo
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
||||||
if (pCB) pCB->setActive(true);
|
if (pCB) pCB->setActive(true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// hide modes combo
|
// hide modes combo
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if (pCB) pCB->setActive(false);
|
if (pCB) pCB->setActive(false);
|
||||||
|
|
||||||
// hide frequencies combo
|
// hide frequencies combo
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
||||||
if (pCB) pCB->setActive(false);
|
if (pCB) pCB->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3202,7 +3202,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
||||||
// Get W, H
|
// Get W, H
|
||||||
sint w = 1024, h = 768;
|
sint w = 1024, h = 768;
|
||||||
{
|
{
|
||||||
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
|
||||||
if( pCB != NULL )
|
if( pCB != NULL )
|
||||||
{
|
{
|
||||||
string vidModeStr = pCB->getText(nVideModeNb).toString();
|
string vidModeStr = pCB->getText(nVideModeNb).toString();
|
||||||
|
@ -3216,7 +3216,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
||||||
// Get Frequency
|
// Get Frequency
|
||||||
sint freq = 60;
|
sint freq = 60;
|
||||||
{
|
{
|
||||||
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
|
||||||
if( pCB != NULL )
|
if( pCB != NULL )
|
||||||
{
|
{
|
||||||
string vidFreqStr = pCB->getText(nVideoFreqNb).toString();
|
string vidFreqStr = pCB->getText(nVideoFreqNb).toString();
|
||||||
|
@ -3227,7 +3227,7 @@ class CHandlerGameConfigApply : public IActionHandler
|
||||||
// Get Fullscreen
|
// Get Fullscreen
|
||||||
bool bFullscreen = false;
|
bool bFullscreen = false;
|
||||||
{
|
{
|
||||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FULLSCREEN_BUTTON ));
|
||||||
if (pBut != NULL)
|
if (pBut != NULL)
|
||||||
bFullscreen = pBut->getPushed();
|
bFullscreen = pBut->getPushed();
|
||||||
}
|
}
|
||||||
|
@ -3823,13 +3823,13 @@ void runMissionProc(sint32 nSelected)
|
||||||
else if (nSelected < nNbMission)
|
else if (nSelected < nNbMission)
|
||||||
{
|
{
|
||||||
string sButtonPath = UI_MISSION_LIST ":b_title"+toString(nSelected);
|
string sButtonPath = UI_MISSION_LIST ":b_title"+toString(nSelected);
|
||||||
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(sButtonPath));
|
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(sButtonPath));
|
||||||
pIM->runActionHandler("proc", pCB, "mission_proc_title|"+toString(nSelected));
|
pIM->runActionHandler("proc", pCB, "mission_proc_title|"+toString(nSelected));
|
||||||
}
|
}
|
||||||
else if (nSelected < (nNbMission+nNbGroupMission))
|
else if (nSelected < (nNbMission+nNbGroupMission))
|
||||||
{
|
{
|
||||||
string sButtonPath = UI_MISSION_LIST ":b_group_title"+toString(nSelected-nNbMission);
|
string sButtonPath = UI_MISSION_LIST ":b_group_title"+toString(nSelected-nNbMission);
|
||||||
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(sButtonPath));
|
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(sButtonPath));
|
||||||
pIM->runActionHandler("proc", pCB, "group_mission_proc_title|"+toString(nSelected-nNbMission));
|
pIM->runActionHandler("proc", pCB, "group_mission_proc_title|"+toString(nSelected-nNbMission));
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -3964,7 +3964,7 @@ public:
|
||||||
{
|
{
|
||||||
// hide interface
|
// hide interface
|
||||||
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pIG = (CInterfaceGroup*)pIM->getElementFromId ("ui:interface:enter_crzone_proposal");
|
CInterfaceGroup *pIG = (CInterfaceGroup*)CWidgetManager::getInstance()->getElementFromId ("ui:interface:enter_crzone_proposal");
|
||||||
if(pIG)
|
if(pIG)
|
||||||
pIG->setActive(false);
|
pIG->setActive(false);
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,7 @@ void CInterfaceHelp::initWindows()
|
||||||
|
|
||||||
for(sint i=0;i<maxHelpWindow;i++)
|
for(sint i=0;i<maxHelpWindow;i++)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:sheet_help"+toString(i)));
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:sheet_help"+toString(i)));
|
||||||
// if the window exist, insert
|
// if the window exist, insert
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
|
@ -275,7 +275,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
if(ok)
|
if(ok)
|
||||||
{
|
{
|
||||||
// then don't neet to open a new window, but make the older top.
|
// then don't neet to open a new window, but make the older top.
|
||||||
pIM->setTopWindow(group);
|
CWidgetManager::getInstance()->setTopWindow(group);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,7 +356,7 @@ CInterfaceGroup *CInterfaceHelp::activateNextWindow(CDBCtrlSheet *elt, sint forc
|
||||||
|
|
||||||
// activate it, set top, copy item watched
|
// activate it, set top, copy item watched
|
||||||
group->setActive(true);
|
group->setActive(true);
|
||||||
pIM->setTopWindow(group);
|
CWidgetManager::getInstance()->setTopWindow(group);
|
||||||
_InfoWindows[newIndexWindow].CtrlSheet= elt;
|
_InfoWindows[newIndexWindow].CtrlSheet= elt;
|
||||||
// insert in list
|
// insert in list
|
||||||
if(mustAddToActiveWindows)
|
if(mustAddToActiveWindows)
|
||||||
|
@ -914,7 +914,7 @@ class CHandlerBrowse : public IActionHandler
|
||||||
void execute (CCtrlBase *pCaller, const std::string &sParams)
|
void execute (CCtrlBase *pCaller, const std::string &sParams)
|
||||||
{
|
{
|
||||||
string container = getParam (sParams, "name");
|
string container = getParam (sParams, "name");
|
||||||
CInterfaceElement *element = CInterfaceManager::getInstance()->getElementFromId(container);
|
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container);
|
||||||
CInterfaceGroup *elementGroup = dynamic_cast<CInterfaceGroup*>(element);
|
CInterfaceGroup *elementGroup = dynamic_cast<CInterfaceGroup*>(element);
|
||||||
|
|
||||||
string urls = getParam (sParams, "url");
|
string urls = getParam (sParams, "url");
|
||||||
|
@ -1055,7 +1055,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
string container = getParam (sParams, "name");
|
string container = getParam (sParams, "name");
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(container));
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(container));
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
groupHtml->browseUndo();
|
groupHtml->browseUndo();
|
||||||
|
@ -1074,7 +1074,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
string container = getParam (sParams, "name");
|
string container = getParam (sParams, "name");
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(container));
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(container));
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
groupHtml->browseRedo();
|
groupHtml->browseRedo();
|
||||||
|
@ -1093,7 +1093,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
string container = getParam (sParams, "name");
|
string container = getParam (sParams, "name");
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(container));
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(container));
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
groupHtml->refresh();
|
groupHtml->refresh();
|
||||||
|
@ -1118,7 +1118,7 @@ class CHandlerHTMLSubmitForm : public IActionHandler
|
||||||
|
|
||||||
string submit_button = getParam (sParams, "submit_button");
|
string submit_button = getParam (sParams, "submit_button");
|
||||||
|
|
||||||
CInterfaceElement *element = CInterfaceManager::getInstance()->getElementFromId(container);
|
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(container);
|
||||||
{
|
{
|
||||||
// Group HTML ?
|
// Group HTML ?
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(element);
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(element);
|
||||||
|
@ -3883,7 +3883,7 @@ public:
|
||||||
string dbitem= getParam(Params, "dbitem");
|
string dbitem= getParam(Params, "dbitem");
|
||||||
string prefix= getParam(Params, "prefix");
|
string prefix= getParam(Params, "prefix");
|
||||||
|
|
||||||
CInterfaceGroup *wnd= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(wndStr));
|
CInterfaceGroup *wnd= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(wndStr));
|
||||||
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbitem);
|
CCDBNodeLeaf *node= NLGUI::CDBManager::getInstance()->getDbProp(dbitem);
|
||||||
|
|
||||||
// common method for info and botchat
|
// common method for info and botchat
|
||||||
|
|
|
@ -107,13 +107,13 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(WindowName) );
|
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(WindowName) );
|
||||||
|
|
||||||
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
||||||
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
||||||
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
||||||
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
||||||
CViewText* display = dynamic_cast<CViewText*>( pIM->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
CViewText* display = dynamic_cast<CViewText*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
||||||
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display)
|
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display)
|
||||||
{
|
{
|
||||||
CClientItemInfo const& itemInfo = getInventory().getItemInfo( ItemSlotId );
|
CClientItemInfo const& itemInfo = getInventory().getItemInfo( ItemSlotId );
|
||||||
|
@ -159,7 +159,7 @@ void CInterfaceItemEdition::CItemEditionWindow::infoReceived()
|
||||||
string::size_type delimiter = text.find(' ');
|
string::size_type delimiter = text.find(' ');
|
||||||
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
||||||
{
|
{
|
||||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:web_transactions:content:html"));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:web_transactions:content:html"));
|
||||||
if (pGH)
|
if (pGH)
|
||||||
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
||||||
if (delimiter == string::npos)
|
if (delimiter == string::npos)
|
||||||
|
@ -197,16 +197,16 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CGroupContainer* group = dynamic_cast<CGroupContainer*>( pIM->getElementFromId(WindowName) );
|
CGroupContainer* group = dynamic_cast<CGroupContainer*>( CWidgetManager::getInstance()->getElementFromId(WindowName) );
|
||||||
|
|
||||||
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
||||||
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
||||||
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
||||||
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
||||||
CViewText* display = dynamic_cast<CViewText*>( pIM->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
CViewText* display = dynamic_cast<CViewText*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
||||||
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
||||||
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( pIM->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
||||||
CViewBitmap* background = dynamic_cast<CViewBitmap*>( pIM->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
CViewBitmap* background = dynamic_cast<CViewBitmap*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
||||||
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ void CInterfaceItemEdition::CItemEditionWindow::begin()
|
||||||
string::size_type delimiter = text.find(' ');
|
string::size_type delimiter = text.find(' ');
|
||||||
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
if(text.size() > 3 && text[0]=='@' && text[1]=='W' && text[2]=='E' && text[3]=='B')
|
||||||
{
|
{
|
||||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:web_transactions:content:html"));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:web_transactions:content:html"));
|
||||||
if (pGH)
|
if (pGH)
|
||||||
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
pGH->browse(ucstring(text.substr(4, delimiter-4)).toString().c_str());
|
||||||
if (delimiter == string::npos)
|
if (delimiter == string::npos)
|
||||||
|
@ -334,16 +334,16 @@ void CInterfaceItemEdition::CItemEditionWindow::end()
|
||||||
// hide the dialog
|
// hide the dialog
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(windowName) );
|
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(windowName) );
|
||||||
|
|
||||||
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
||||||
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
||||||
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
||||||
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
||||||
CViewText* display = dynamic_cast<CViewText*>( pIM->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
CViewText* display = dynamic_cast<CViewText*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
||||||
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
||||||
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( pIM->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
||||||
CViewBitmap* background = dynamic_cast<CViewBitmap*>( pIM->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
CViewBitmap* background = dynamic_cast<CViewBitmap*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
||||||
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
||||||
{
|
{
|
||||||
// disable the window
|
// disable the window
|
||||||
|
@ -373,16 +373,16 @@ void CInterfaceItemEdition::CItemEditionWindow::validate()
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(windowName) );
|
CInterfaceGroup* group = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(windowName) );
|
||||||
|
|
||||||
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
CInterfaceGroup* editShort = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_short")) );
|
||||||
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
CGroupEditBox* editBoxShort = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_short")) );
|
||||||
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
CInterfaceGroup* editLarge = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_large")) );
|
||||||
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
CGroupEditBox* editBoxLarge = dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_box_large")) );
|
||||||
CViewText* display = dynamic_cast<CViewText*>( pIM->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
CViewText* display = dynamic_cast<CViewText*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_display")) );
|
||||||
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
CInterfaceGroup* editButtons = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_edit_buttons")) );
|
||||||
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( pIM->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
CCtrlBaseButton* closeButton = dynamic_cast<CCtrlBaseButton*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_close_button")) );
|
||||||
CViewBitmap* background = dynamic_cast<CViewBitmap*>( pIM->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
CViewBitmap* background = dynamic_cast<CViewBitmap*>( CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("edit_custom_background")) );
|
||||||
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
if (group && editShort && editBoxShort && editLarge && editBoxLarge && display && editButtons && closeButton && background)
|
||||||
{
|
{
|
||||||
bool textValid = editShort->getActive();
|
bool textValid = editShort->getActive();
|
||||||
|
@ -479,8 +479,8 @@ static void displayQuantityPopup(CCtrlBase *pCaller, CDBCtrlSheet *pCSSrc, CDBCt
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId("ui:interface:stack_dialog") );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId("ui:interface:stack_dialog") );
|
||||||
CGroupEditBox *editBox= dynamic_cast<CGroupEditBox*>( pIM->getElementFromId("ui:interface:stack_dialog:edit:eb") );
|
CGroupEditBox *editBox= dynamic_cast<CGroupEditBox*>( CWidgetManager::getInstance()->getElementFromId("ui:interface:stack_dialog:edit:eb") );
|
||||||
if(group && editBox)
|
if(group && editBox)
|
||||||
{
|
{
|
||||||
// write all info for the modal
|
// write all info for the modal
|
||||||
|
@ -500,7 +500,7 @@ static void displayQuantityPopup(CCtrlBase *pCaller, CDBCtrlSheet *pCSSrc, CDBCt
|
||||||
editBox->setInputStringAsInt(availableStack);
|
editBox->setInputStringAsInt(availableStack);
|
||||||
|
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
|
|
||||||
// Set the Keyboard focus to the editbox (after the enableModalWindow())
|
// Set the Keyboard focus to the editbox (after the enableModalWindow())
|
||||||
pIM->setCaptureKeyboard(editBox);
|
pIM->setCaptureKeyboard(editBox);
|
||||||
|
@ -723,7 +723,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if ((pCSSrc == NULL) || (pCSDst == NULL)) return;
|
if ((pCSSrc == NULL) || (pCSDst == NULL)) return;
|
||||||
|
@ -828,7 +828,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *src = dynamic_cast<CDBCtrlSheet *>(pCaller);
|
CDBCtrlSheet *src = dynamic_cast<CDBCtrlSheet *>(pCaller);
|
||||||
CDBCtrlSheet *dest = dynamic_cast<CDBCtrlSheet *>(im->getCtrlLaunchingModal());
|
CDBCtrlSheet *dest = dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (src->getSheetId() == 0)
|
if (src->getSheetId() == 0)
|
||||||
{
|
{
|
||||||
putExchangedItemToInventory(dest);
|
putExchangedItemToInventory(dest);
|
||||||
|
@ -866,7 +866,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if (pCSSrc->getType() == CCtrlSheetInfo::SheetType_Item)
|
if (pCSSrc->getType() == CCtrlSheetInfo::SheetType_Item)
|
||||||
|
@ -887,7 +887,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if (pCSSrc->getType() == CCtrlSheetInfo::SheetType_Item)
|
if (pCSSrc->getType() == CCtrlSheetInfo::SheetType_Item)
|
||||||
|
@ -933,7 +933,7 @@ public:
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
string strTestEmpty= getParam(Params, "test_empty");
|
string strTestEmpty= getParam(Params, "test_empty");
|
||||||
bool testEmpty= strTestEmpty=="true";
|
bool testEmpty= strTestEmpty=="true";
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if (!pCSSrc || !pCSDst) return;
|
if (!pCSSrc || !pCSDst) return;
|
||||||
|
@ -1024,7 +1024,7 @@ class CCanDropToExchange : public IActionHandler
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if (!pCSSrc || !pCSDst) return;
|
if (!pCSSrc || !pCSDst) return;
|
||||||
|
@ -1489,7 +1489,7 @@ class CHandlerMoveItem : public IActionHandler
|
||||||
string sListId = getParam(sParams, "listsheet"+toString(nListIt));
|
string sListId = getParam(sParams, "listsheet"+toString(nListIt));
|
||||||
while (!sListId.empty())
|
while (!sListId.empty())
|
||||||
{
|
{
|
||||||
IListSheetBase *pLS = dynamic_cast<IListSheetBase*>(pIM->getElementFromId(sListId));
|
IListSheetBase *pLS = dynamic_cast<IListSheetBase*>(CWidgetManager::getInstance()->getElementFromId(sListId));
|
||||||
if (pLS == NULL) return;
|
if (pLS == NULL) return;
|
||||||
// search an empty slot where to put
|
// search an empty slot where to put
|
||||||
sint32 nbelt = pLS->getNbSheet();
|
sint32 nbelt = pLS->getNbSheet();
|
||||||
|
@ -1550,7 +1550,7 @@ class CHandlerMoveItem : public IActionHandler
|
||||||
while (!sGrpId.empty())
|
while (!sGrpId.empty())
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(sGrpId));
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(sGrpId));
|
||||||
if (pIG != NULL)
|
if (pIG != NULL)
|
||||||
{
|
{
|
||||||
// Get all the sheets of the group
|
// Get all the sheets of the group
|
||||||
|
@ -1583,7 +1583,7 @@ class CHandlerMoveItem : public IActionHandler
|
||||||
while (!sGrpId.empty())
|
while (!sGrpId.empty())
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(sGrpId));
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(sGrpId));
|
||||||
if (pIG != NULL)
|
if (pIG != NULL)
|
||||||
{
|
{
|
||||||
// Get all the sheets of the group
|
// Get all the sheets of the group
|
||||||
|
@ -1626,8 +1626,8 @@ class CHandlerDragNDrop : public IActionHandler
|
||||||
string sDst = getParam(sParams,"dst");
|
string sDst = getParam(sParams,"dst");
|
||||||
string sAH = getParam(sParams,"ah");
|
string sAH = getParam(sParams,"ah");
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCSsrc = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sSrc));
|
CDBCtrlSheet *pCSsrc = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sSrc));
|
||||||
CDBCtrlSheet *pCSdst = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sDst));
|
CDBCtrlSheet *pCSdst = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sDst));
|
||||||
if ((pCSdst == NULL) || (pCSsrc == NULL) || sAH.empty()) return;
|
if ((pCSdst == NULL) || (pCSsrc == NULL) || sAH.empty()) return;
|
||||||
pIM->runActionHandler(sAH, pCSdst, "src="+pCSsrc->getId());
|
pIM->runActionHandler(sAH, pCSdst, "src="+pCSsrc->getId());
|
||||||
}
|
}
|
||||||
|
@ -1668,7 +1668,7 @@ class CHandlerItemCristalReload : public IActionHandler
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
|
|
||||||
sendToServerEnchantMessage((uint8)pCS->getInventoryIndex(), (uint16)pCS->getIndexInDB());
|
sendToServerEnchantMessage((uint8)pCS->getInventoryIndex(), (uint16)pCS->getIndexInDB());
|
||||||
|
@ -1701,7 +1701,7 @@ void CItemMenuInBagInfoWaiter::infoValidated(CDBCtrlSheet* ctrlSheet)
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// get the dialog stack
|
// get the dialog stack
|
||||||
CInterfaceGroup* pMenu = dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId("ui:interface:item_menu_in_bag") );
|
CInterfaceGroup* pMenu = dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId("ui:interface:item_menu_in_bag") );
|
||||||
if(!pMenu) return;
|
if(!pMenu) return;
|
||||||
|
|
||||||
const CItemSheet *pIS = ctrlSheet->asItemSheet();
|
const CItemSheet *pIS = ctrlSheet->asItemSheet();
|
||||||
|
@ -1734,7 +1734,7 @@ class CHandlerItemMenuCheck : public IActionHandler
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
// Get the ctrl sheet that launched this menu
|
// Get the ctrl sheet that launched this menu
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
INVENTORIES::TInventory invId= (INVENTORIES::TInventory)pCS->getInventoryIndex();
|
INVENTORIES::TInventory invId= (INVENTORIES::TInventory)pCS->getInventoryIndex();
|
||||||
|
|
||||||
|
@ -2039,7 +2039,7 @@ class CHandlerItemMenuBaseCheck : public IActionHandler
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// Get the ctrl sheet that launched this menu
|
// Get the ctrl sheet that launched this menu
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
INVENTORIES::TInventory invId= (INVENTORIES::TInventory)pCS->getInventoryIndex();
|
INVENTORIES::TInventory invId= (INVENTORIES::TInventory)pCS->getInventoryIndex();
|
||||||
|
|
||||||
|
@ -2111,7 +2111,7 @@ class CHandlerTeleportUse : public IActionHandler
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
|
|
||||||
// use the item
|
// use the item
|
||||||
|
@ -2143,7 +2143,7 @@ class CHandlerItemConsume : public IActionHandler
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
|
|
||||||
// use the item
|
// use the item
|
||||||
|
@ -2171,7 +2171,7 @@ class CHandlerItemTextDisplay : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string const& windowName = sParams;
|
std::string const& windowName = sParams;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCSItem = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCSItem = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCSItem == NULL || windowName.empty())
|
if (pCSItem == NULL || windowName.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2188,7 +2188,7 @@ class CHandlerItemTextEdition : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string const& windowName = sParams;
|
std::string const& windowName = sParams;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCSItem = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCSItem = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCSItem == NULL || windowName.empty())
|
if (pCSItem == NULL || windowName.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -2213,7 +2213,7 @@ class CHandlerXpCatalyserUse : public IActionHandler
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
|
|
||||||
// use the item
|
// use the item
|
||||||
|
|
|
@ -99,13 +99,13 @@ void CActionHandlerShowOne::execute (CCtrlBase * /* pCaller */, const std::strin
|
||||||
// hide all window from the list.
|
// hide all window from the list.
|
||||||
for(uint i=0;i<wndList.size();i++)
|
for(uint i=0;i<wndList.size();i++)
|
||||||
{
|
{
|
||||||
CInterfaceElement *wnd= mngr->getElementFromId(wndList[i]);
|
CInterfaceElement *wnd= CWidgetManager::getInstance()->getElementFromId(wndList[i]);
|
||||||
if(wnd)
|
if(wnd)
|
||||||
wnd->setActive(false);
|
wnd->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// show the one needed
|
// show the one needed
|
||||||
CInterfaceElement *wnd= mngr->getElementFromId(wndShow);
|
CInterfaceElement *wnd= CWidgetManager::getInstance()->getElementFromId(wndShow);
|
||||||
if(wnd)
|
if(wnd)
|
||||||
wnd->setActive(true);
|
wnd->setActive(true);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ void CActionHandlerActive::execute (CCtrlBase * /* pCaller */, const std::string
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CInterfaceManager *mngr = CInterfaceManager::getInstance();
|
CInterfaceManager *mngr = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *wnd = mngr->getElementFromId(target);
|
CInterfaceElement *wnd = CWidgetManager::getInstance()->getElementFromId(target);
|
||||||
if(!wnd)
|
if(!wnd)
|
||||||
{
|
{
|
||||||
nlwarning("<CActionHandlerActive::execute> Can't get window %s", target.c_str());
|
nlwarning("<CActionHandlerActive::execute> Can't get window %s", target.c_str());
|
||||||
|
@ -158,7 +158,7 @@ void CActionHandlerSetOpen::execute (CCtrlBase * /* pCaller */, const std::strin
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CInterfaceManager *mngr = CInterfaceManager::getInstance();
|
CInterfaceManager *mngr = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *wnd = dynamic_cast<CGroupContainer*>(mngr->getElementFromId(target));
|
CGroupContainer *wnd = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(target));
|
||||||
if(!wnd)
|
if(!wnd)
|
||||||
{
|
{
|
||||||
nlwarning("<CActionHandlerActive::execute> Can't get window %s", target.c_str());
|
nlwarning("<CActionHandlerActive::execute> Can't get window %s", target.c_str());
|
||||||
|
@ -199,7 +199,7 @@ void CActionHandlerHideClose::execute (CCtrlBase * /* pCaller */, const std::str
|
||||||
uint i;
|
uint i;
|
||||||
for(i=0;i<hideList.size();i++)
|
for(i=0;i<hideList.size();i++)
|
||||||
{
|
{
|
||||||
CInterfaceElement *wnd= mngr->getElementFromId(hideList[i]);
|
CInterfaceElement *wnd= CWidgetManager::getInstance()->getElementFromId(hideList[i]);
|
||||||
if(wnd)
|
if(wnd)
|
||||||
wnd->setActive(false);
|
wnd->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -208,7 +208,7 @@ void CActionHandlerHideClose::execute (CCtrlBase * /* pCaller */, const std::str
|
||||||
for(i=0;i<closeList.size();i++)
|
for(i=0;i<closeList.size();i++)
|
||||||
{
|
{
|
||||||
// get a container if possible
|
// get a container if possible
|
||||||
CInterfaceElement *wnd= mngr->getElementFromId(closeList[i]);
|
CInterfaceElement *wnd= CWidgetManager::getInstance()->getElementFromId(closeList[i]);
|
||||||
CGroupContainer *pIC = dynamic_cast<CGroupContainer*>(wnd);
|
CGroupContainer *pIC = dynamic_cast<CGroupContainer*>(wnd);
|
||||||
if(pIC)
|
if(pIC)
|
||||||
pIC->close();
|
pIC->close();
|
||||||
|
@ -236,13 +236,13 @@ void CActionHandlerEnterModal::execute(CCtrlBase *pCaller, const std::string &pa
|
||||||
|
|
||||||
// get the group from param
|
// get the group from param
|
||||||
string groupName= getParam(params, "group");
|
string groupName= getParam(params, "group");
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(groupName) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(groupName) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
UserControls.stopFreeLook();
|
UserControls.stopFreeLook();
|
||||||
|
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -257,11 +257,11 @@ void CActionHandlerPushModal::execute(CCtrlBase *pCaller, const std::string &par
|
||||||
|
|
||||||
// get the group from param
|
// get the group from param
|
||||||
string groupName= getParam(params, "group");
|
string groupName= getParam(params, "group");
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( mngr->getElementFromId(groupName) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(groupName) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// enable the modal
|
// enable the modal
|
||||||
mngr->pushModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->pushModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -276,7 +276,7 @@ void CActionHandlerLeaveModal::execute(CCtrlBase * /* pCaller */, const std::str
|
||||||
CInterfaceManager *mngr= CInterfaceManager::getInstance();
|
CInterfaceManager *mngr= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// quit the modal
|
// quit the modal
|
||||||
mngr->popModalWindow();
|
CWidgetManager::getInstance()->popModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ class CAHFreeMouse : public IActionHandler
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
if (im)
|
if (im)
|
||||||
{
|
{
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId("ui:interface:game_config"));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_config"));
|
||||||
if (ig && ig->getActive())
|
if (ig && ig->getActive())
|
||||||
{
|
{
|
||||||
CInterfaceGroup *igHard = dynamic_cast<CInterfaceGroup *>(ig->getGroup("hard"));
|
CInterfaceGroup *igHard = dynamic_cast<CInterfaceGroup *>(ig->getGroup("hard"));
|
||||||
|
|
|
@ -207,7 +207,7 @@ public:
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId(sParams));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId(sParams));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ public:
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId(sParams));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId(sParams));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -263,10 +263,10 @@ void launchPhraseComposition(bool creation)
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// Launch the composition window
|
// Launch the composition window
|
||||||
CGroupContainer *window= dynamic_cast<CGroupContainer*>( pIM->getElementFromId(PhraseComposition) );
|
CGroupContainer *window= dynamic_cast<CGroupContainer*>( CWidgetManager::getInstance()->getElementFromId(PhraseComposition) );
|
||||||
if(window)
|
if(window)
|
||||||
{
|
{
|
||||||
CDBGroupBuildPhrase *buildSentenceTarget= dynamic_cast<CDBGroupBuildPhrase*>( pIM->getElementFromId(PhraseCompositionGroup) );
|
CDBGroupBuildPhrase *buildSentenceTarget= dynamic_cast<CDBGroupBuildPhrase*>( CWidgetManager::getInstance()->getElementFromId(PhraseCompositionGroup) );
|
||||||
// if found
|
// if found
|
||||||
if(buildSentenceTarget)
|
if(buildSentenceTarget)
|
||||||
{
|
{
|
||||||
|
@ -371,7 +371,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// And hide the modal
|
// And hide the modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
public:
|
public:
|
||||||
enum TType {Root, OtherMain, Param, NewOpCredit, FaberPlan};
|
enum TType {Root, OtherMain, Param, NewOpCredit, FaberPlan};
|
||||||
|
@ -418,11 +418,11 @@ public:
|
||||||
buildGroup->fillSelectionMain(index);
|
buildGroup->fillSelectionMain(index);
|
||||||
|
|
||||||
// launch the modal
|
// launch the modal
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -456,11 +456,11 @@ public:
|
||||||
buildGroup->fillSelectionParam(index, paramIndex);
|
buildGroup->fillSelectionParam(index, paramIndex);
|
||||||
|
|
||||||
// launch the modal
|
// launch the modal
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -493,11 +493,11 @@ public:
|
||||||
buildGroup->fillSelectionNewCredit();
|
buildGroup->fillSelectionNewCredit();
|
||||||
|
|
||||||
// launch the modal
|
// launch the modal
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -541,11 +541,11 @@ public:
|
||||||
CHandlerPhraseValidateBrick::BrickType= CHandlerPhraseValidateBrick::FaberPlan;
|
CHandlerPhraseValidateBrick::BrickType= CHandlerPhraseValidateBrick::FaberPlan;
|
||||||
|
|
||||||
// launch the modal
|
// launch the modal
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId( CDBGroupBuildPhrase::BrickSelectionModal ) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(pCaller, group);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -571,7 +571,7 @@ static void updateAllSPhraseInfo()
|
||||||
// update all info windows
|
// update all info windows
|
||||||
CInterfaceHelp::updateWindowSPhraseTexts();
|
CInterfaceHelp::updateWindowSPhraseTexts();
|
||||||
// If the composition is opened, refresh
|
// If the composition is opened, refresh
|
||||||
CInterfaceGroup *pIG= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:phrase_composition"));
|
CInterfaceGroup *pIG= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:phrase_composition"));
|
||||||
if(pIG && pIG->getActive())
|
if(pIG && pIG->getActive())
|
||||||
{
|
{
|
||||||
CDBGroupBuildPhrase *buildPhrase= dynamic_cast<CDBGroupBuildPhrase*>(pIG->getGroup("header_opened"));
|
CDBGroupBuildPhrase *buildPhrase= dynamic_cast<CDBGroupBuildPhrase*>(pIG->getGroup("header_opened"));
|
||||||
|
@ -653,7 +653,7 @@ public:
|
||||||
CMacroCmdManager *pMM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMM = CMacroCmdManager::getInstance();
|
||||||
|
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
// can be a phrase id (comes from memory), a phraseSheet (comes from progression), or a macro,
|
// can be a phrase id (comes from memory), a phraseSheet (comes from progression), or a macro,
|
||||||
|
@ -806,7 +806,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
|
|
||||||
// type check
|
// type check
|
||||||
|
@ -1265,9 +1265,9 @@ public:
|
||||||
// get the control
|
// get the control
|
||||||
CInterfaceElement *elm;
|
CInterfaceElement *elm;
|
||||||
if (shortcut < RYZOM_MAX_SHORTCUT)
|
if (shortcut < RYZOM_MAX_SHORTCUT)
|
||||||
elm = pIM->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
elm = CWidgetManager::getInstance()->getElementFromId(PhraseMemoryCtrlBase + toString(shortcut) );
|
||||||
else
|
else
|
||||||
elm = pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(shortcut-RYZOM_MAX_SHORTCUT) );
|
elm = CWidgetManager::getInstance()->getElementFromId(PhraseMemoryAltCtrlBase + toString(shortcut-RYZOM_MAX_SHORTCUT) );
|
||||||
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(elm);
|
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(elm);
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
|
@ -1314,7 +1314,7 @@ public:
|
||||||
{
|
{
|
||||||
// opens the menu
|
// opens the menu
|
||||||
CDBCtrlSheet::setCurrSelSheet(pCSDst);
|
CDBCtrlSheet::setCurrSelSheet(pCSDst);
|
||||||
pIM->enableModalWindow (pCSDst, menu);
|
CWidgetManager::getInstance()->enableModalWindow (pCSDst, menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1443,7 +1443,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CSPhraseManager *pPM = CSPhraseManager::getInstance();
|
CSPhraseManager *pPM = CSPhraseManager::getInstance();
|
||||||
CSBrickManager *pBM = CSBrickManager::getInstance();
|
CSBrickManager *pBM = CSBrickManager::getInstance();
|
||||||
CInterfaceElement *pCristalizeMenuOption = pIM->getElementFromId(sCristalizePath);
|
CInterfaceElement *pCristalizeMenuOption = CWidgetManager::getInstance()->getElementFromId(sCristalizePath);
|
||||||
|
|
||||||
if (pCristalizeMenuOption == NULL) return;
|
if (pCristalizeMenuOption == NULL) return;
|
||||||
// The default is to not display the cristalize menu option
|
// The default is to not display the cristalize menu option
|
||||||
|
@ -1452,7 +1452,7 @@ public:
|
||||||
|
|
||||||
// Get the interface control sheet
|
// Get the interface control sheet
|
||||||
|
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
if (!pCS->isSPhraseIdMemory()) return;
|
if (!pCS->isSPhraseIdMemory()) return;
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ class CAHUIOpen : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -111,7 +111,7 @@ class CAHUIClose : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -132,7 +132,7 @@ class CAHUIOpenClose : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -154,7 +154,7 @@ class CAHUIPopup : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -185,7 +185,7 @@ class CAHUIPopin : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -220,7 +220,7 @@ class CAHUIPopupPopin : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -256,7 +256,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -307,7 +307,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -316,7 +316,7 @@ public:
|
||||||
if (!isContainerAuthorized(pGC)) return;
|
if (!isContainerAuthorized(pGC)) return;
|
||||||
|
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CAHUIShow, "show" );
|
REGISTER_ACTION_HANDLER( CAHUIShow, "show" );
|
||||||
|
@ -338,7 +338,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", Params));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", Params));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", Params.c_str());
|
nlwarning("%s is not a container", Params.c_str());
|
||||||
|
@ -388,7 +388,7 @@ class CAHUIShowHide : public IActionHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface", window));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface", window));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a container", window.c_str());
|
nlwarning("%s is not a container", window.c_str());
|
||||||
|
@ -410,7 +410,7 @@ class CAHUIShowHide : public IActionHandler
|
||||||
}
|
}
|
||||||
if(!webapp.empty() && pGC->getActive())
|
if(!webapp.empty() && pGC->getActive())
|
||||||
{
|
{
|
||||||
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:webig:content:html"));
|
||||||
if (pGH == NULL)
|
if (pGH == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("%s is not a group html", window.c_str());
|
nlwarning("%s is not a group html", window.c_str());
|
||||||
|
@ -533,7 +533,7 @@ class CAHTalkUntalk : public IActionHandler
|
||||||
cw->getContainer()->setActive(true);
|
cw->getContainer()->setActive(true);
|
||||||
cw->getContainer()->setOpen(true);
|
cw->getContainer()->setOpen(true);
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->setTopWindow(cw->getContainer());
|
CWidgetManager::getInstance()->setTopWindow(cw->getContainer());
|
||||||
cw->enableBlink(1);
|
cw->enableBlink(1);
|
||||||
im->setCaptureKeyboard(cw->getEditBox());
|
im->setCaptureKeyboard(cw->getEditBox());
|
||||||
PeopleInterraction.MainChat.Filter.setTargetPlayer(selection->getName());
|
PeopleInterraction.MainChat.Filter.setTargetPlayer(selection->getName());
|
||||||
|
@ -654,8 +654,8 @@ class CAHUISetTopWindow : public IActionHandler
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string sWin = getParam(Params,"win");
|
string sWin = getParam(Params,"win");
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(sWin));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(sWin));
|
||||||
if (pGC != NULL && isContainerAuthorized(pGC)) pIM->setTopWindow(pGC);
|
if (pGC != NULL && isContainerAuthorized(pGC)) CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CAHUISetTopWindow, "set_top_window" );
|
REGISTER_ACTION_HANDLER( CAHUISetTopWindow, "set_top_window" );
|
||||||
|
|
|
@ -133,7 +133,7 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
||||||
// **** Hide all widgets, MP Ctrls, and reset DB, until the Plan is not selected
|
// **** Hide all widgets, MP Ctrls, and reset DB, until the Plan is not selected
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
// Hide the valid button
|
// Hide the valid button
|
||||||
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(FaberPhraseValidButton));
|
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseValidButton));
|
||||||
if(validButton)
|
if(validButton)
|
||||||
validButton->setFrozen(true);
|
validButton->setFrozen(true);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hide item requirements groups per default
|
// Hide item requirements groups per default
|
||||||
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
||||||
if(itemReqLineGroup)
|
if(itemReqLineGroup)
|
||||||
itemReqLineGroup->setActive(false);
|
itemReqLineGroup->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -166,13 +166,13 @@ void CActionPhraseFaber::launchFaberCastWindow(sint32 memoryLine, uint memoryIn
|
||||||
node->setValue32(0);
|
node->setValue32(0);
|
||||||
|
|
||||||
// Hide the ItemResult group
|
// Hide the ItemResult group
|
||||||
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseItemResultGroup));
|
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseItemResultGroup));
|
||||||
if(groupMp)
|
if(groupMp)
|
||||||
groupMp->setActive(false);
|
groupMp->setActive(false);
|
||||||
|
|
||||||
|
|
||||||
// **** Open the window!
|
// **** Open the window!
|
||||||
CGroupContainer *window= dynamic_cast<CGroupContainer*>(pIM->getElementFromId(FaberPhraseWindow));
|
CGroupContainer *window= dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseWindow));
|
||||||
if(window)
|
if(window)
|
||||||
{
|
{
|
||||||
window->setActive(true);
|
window->setActive(true);
|
||||||
|
@ -385,7 +385,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
node->setValue32(itemPlanBrick->FaberPlan.NbItemBuilt);
|
node->setValue32(itemPlanBrick->FaberPlan.NbItemBuilt);
|
||||||
|
|
||||||
// Show the ItemResult group
|
// Show the ItemResult group
|
||||||
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseItemResultGroup));
|
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseItemResultGroup));
|
||||||
if(groupMp)
|
if(groupMp)
|
||||||
groupMp->setActive(true);
|
groupMp->setActive(true);
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
|
|
||||||
// **** show ItemParts according to plan.
|
// **** show ItemParts according to plan.
|
||||||
// Hide the valid button
|
// Hide the valid button
|
||||||
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(FaberPhraseValidButton));
|
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseValidButton));
|
||||||
if(validButton)
|
if(validButton)
|
||||||
validButton->setFrozen(true);
|
validButton->setFrozen(true);
|
||||||
|
|
||||||
|
@ -489,7 +489,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup item requirement groups
|
// Setup item requirement groups
|
||||||
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
||||||
if(itemReqLineGroup)
|
if(itemReqLineGroup)
|
||||||
{
|
{
|
||||||
if( itemReqLine<_MPBuildNumTotalItemReq )
|
if( itemReqLine<_MPBuildNumTotalItemReq )
|
||||||
|
@ -556,7 +556,7 @@ void CActionPhraseFaber::validateFaberPlanSelection(CSBrickSheet *itemPlanBrick
|
||||||
}
|
}
|
||||||
|
|
||||||
// **** Setup the new window title
|
// **** Setup the new window title
|
||||||
CGroupContainer *window= dynamic_cast<CGroupContainer*>(pIM->getElementFromId(FaberPhraseWindow));
|
CGroupContainer *window= dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseWindow));
|
||||||
if(window)
|
if(window)
|
||||||
{
|
{
|
||||||
// Setup the Title with the item built
|
// Setup the Title with the item built
|
||||||
|
@ -666,7 +666,7 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
|
||||||
|
|
||||||
// get the ctrlSlot
|
// get the ctrlSlot
|
||||||
CDBCtrlSheet *ctrlSlot= NULL;
|
CDBCtrlSheet *ctrlSlot= NULL;
|
||||||
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
CInterfaceGroup *itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
||||||
if(itemReqLineGroup)
|
if(itemReqLineGroup)
|
||||||
{
|
{
|
||||||
CDBGroupListSheet *listSheet= dynamic_cast<CDBGroupListSheet*>(itemReqLineGroup->getGroup(FaberPhraseList));
|
CDBGroupListSheet *listSheet= dynamic_cast<CDBGroupListSheet*>(itemReqLineGroup->getGroup(FaberPhraseList));
|
||||||
|
@ -702,7 +702,7 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
|
||||||
_MpChangeQuantitySlot= mpSlot;
|
_MpChangeQuantitySlot= mpSlot;
|
||||||
|
|
||||||
// Setup the text with value by default
|
// Setup the text with value by default
|
||||||
CInterfaceGroup *quantityModal= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseMpQuantityModal));
|
CInterfaceGroup *quantityModal= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseMpQuantityModal));
|
||||||
if(quantityModal)
|
if(quantityModal)
|
||||||
{
|
{
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(quantityModal->getGroup("eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(quantityModal->getGroup("eb"));
|
||||||
|
@ -715,7 +715,7 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
|
||||||
}
|
}
|
||||||
|
|
||||||
// launch the modal
|
// launch the modal
|
||||||
pIM->enableModalWindow(ctrlSlot, quantityModal);
|
CWidgetManager::getInstance()->enableModalWindow(ctrlSlot, quantityModal);
|
||||||
}
|
}
|
||||||
// else select new MP
|
// else select new MP
|
||||||
else
|
else
|
||||||
|
@ -756,7 +756,7 @@ void CActionPhraseFaber::startMpSelection(uint itemReqLine, uint mpSlot)
|
||||||
_MpCurrentSelection= selectMps;
|
_MpCurrentSelection= selectMps;
|
||||||
|
|
||||||
// Open the Selection Window.
|
// Open the Selection Window.
|
||||||
pIM->enableModalWindow(ctrlSlot, FaberPhraseMpListModal);
|
CWidgetManager::getInstance()->enableModalWindow(ctrlSlot, FaberPhraseMpListModal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -767,7 +767,7 @@ void CActionPhraseFaber::validateMpSelection(uint selectId)
|
||||||
|
|
||||||
if(selectId>=_MpCurrentSelection.size())
|
if(selectId>=_MpCurrentSelection.size())
|
||||||
{
|
{
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -817,7 +817,7 @@ void CActionPhraseFaber::validateMpSelection(uint selectId)
|
||||||
|
|
||||||
// must hide the modal window which had open us. NB: must be done here because next,
|
// must hide the modal window which had open us. NB: must be done here because next,
|
||||||
// we'll open the MP quantity selection
|
// we'll open the MP quantity selection
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
|
|
||||||
// **** when all is correctly ended, open the quantity selection
|
// **** when all is correctly ended, open the quantity selection
|
||||||
// NB: just enable this code, if you want this feature
|
// NB: just enable this code, if you want this feature
|
||||||
|
@ -882,7 +882,7 @@ void CActionPhraseFaber::validateMpSelectQuantity()
|
||||||
updateItemResult();
|
updateItemResult();
|
||||||
|
|
||||||
// hide the Modal Quantity selection
|
// hide the Modal Quantity selection
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -931,7 +931,7 @@ void CActionPhraseFaber::validateExecution()
|
||||||
|
|
||||||
// NO more Close the Execution window (allow refaber quick)
|
// NO more Close the Execution window (allow refaber quick)
|
||||||
/*CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
/*CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *window= pIM->getElementFromId(FaberPhraseWindow);
|
CInterfaceElement *window= CWidgetManager::getInstance()->getElementFromId(FaberPhraseWindow);
|
||||||
if(window)
|
if(window)
|
||||||
window->setActive(false);
|
window->setActive(false);
|
||||||
*/
|
*/
|
||||||
|
@ -981,7 +981,7 @@ void CActionPhraseFaber::updateEmptySlot(uint itemReqLine, CInterfaceGroup *it
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
if(!itemReqLineGroup)
|
if(!itemReqLineGroup)
|
||||||
itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
itemReqLineGroup= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId( toString(FaberPhraseItemReqLine.c_str(), itemReqLine) ));
|
||||||
if(!itemReqLineGroup)
|
if(!itemReqLineGroup)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1085,7 +1085,7 @@ void CActionPhraseFaber::updateValidButton()
|
||||||
|
|
||||||
// unfreeze if valid
|
// unfreeze if valid
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(FaberPhraseValidButton));
|
CCtrlBaseButton *validButton= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseValidButton));
|
||||||
if(validButton) validButton->setFrozen(!canValid);
|
if(validButton) validButton->setFrozen(!canValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1178,7 +1178,7 @@ public:
|
||||||
if(!ctrl)
|
if(!ctrl)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1213,7 +1213,7 @@ public:
|
||||||
{
|
{
|
||||||
// get the button
|
// get the button
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CCtrlBaseButton *button= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(FaberPhraseValidButton));
|
CCtrlBaseButton *button= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseValidButton));
|
||||||
|
|
||||||
// Ok, button found. test if active.
|
// Ok, button found. test if active.
|
||||||
if( button && !button->getFrozen() )
|
if( button && !button->getFrozen() )
|
||||||
|
@ -1265,7 +1265,7 @@ void validateFaberPlanSelection(CSBrickSheet *itemPlanBrick)
|
||||||
void closeFaberCastWindow()
|
void closeFaberCastWindow()
|
||||||
{
|
{
|
||||||
if (ActionPhraseFaber == NULL) return;
|
if (ActionPhraseFaber == NULL) return;
|
||||||
CGroupContainer *window= dynamic_cast<CGroupContainer*>(CInterfaceManager::getInstance()->getElementFromId(FaberPhraseWindow));
|
CGroupContainer *window= dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseWindow));
|
||||||
if(window && window->getActive())
|
if(window && window->getActive())
|
||||||
window->setActive(false);
|
window->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -1480,12 +1480,12 @@ void CActionPhraseFaber::onInventoryChange()
|
||||||
updateValidButton();
|
updateValidButton();
|
||||||
|
|
||||||
// close selection modals if they are opened
|
// close selection modals if they are opened
|
||||||
CInterfaceGroup *quantityModal= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseMpQuantityModal));
|
CInterfaceGroup *quantityModal= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseMpQuantityModal));
|
||||||
if(quantityModal && pIM->getModalWindow()==quantityModal)
|
if(quantityModal && CWidgetManager::getInstance()->getModalWindow()==quantityModal)
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
CInterfaceGroup *listModal= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseMpListModal));
|
CInterfaceGroup *listModal= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseMpListModal));
|
||||||
if(listModal && pIM->getModalWindow()==listModal)
|
if(listModal && CWidgetManager::getInstance()->getModalWindow()==listModal)
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
|
|
||||||
// update item result
|
// update item result
|
||||||
updateItemResult();
|
updateItemResult();
|
||||||
|
@ -1674,7 +1674,7 @@ void CActionPhraseFaber::updateItemResult()
|
||||||
|
|
||||||
|
|
||||||
// **** change success rate too
|
// **** change success rate too
|
||||||
CViewText *successView= dynamic_cast<CViewText*>(pIM->getElementFromId(FaberPhraseFpSuccessText));
|
CViewText *successView= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseFpSuccessText));
|
||||||
if(successView)
|
if(successView)
|
||||||
{
|
{
|
||||||
ucstring text= CI18N::get("uiPhraseFaberSuccessRate");
|
ucstring text= CI18N::get("uiPhraseFaberSuccessRate");
|
||||||
|
@ -1742,7 +1742,7 @@ void CActionPhraseFaber::updateItemResult()
|
||||||
|
|
||||||
|
|
||||||
// **** Stats
|
// **** Stats
|
||||||
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(FaberPhraseItemResultGroup));
|
CInterfaceGroup *groupMp= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(FaberPhraseItemResultGroup));
|
||||||
if(groupMp)
|
if(groupMp)
|
||||||
{
|
{
|
||||||
// default: hide all
|
// default: hide all
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
void CBotChatPage::activateWindow(const char *windowName, bool active)
|
void CBotChatPage::activateWindow(const char *windowName, bool active)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(windowName));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(windowName));
|
||||||
if (ig)
|
if (ig)
|
||||||
{
|
{
|
||||||
ig->setActive(active);
|
ig->setActive(active);
|
||||||
|
|
|
@ -59,13 +59,13 @@ class CHandlerGuildCreate : public IActionHandler
|
||||||
string IconWin = getParam(Params, "icon");
|
string IconWin = getParam(Params, "icon");
|
||||||
string guildDescWin = getParam(Params, "desc");
|
string guildDescWin = getParam(Params, "desc");
|
||||||
|
|
||||||
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(guildNameWin));
|
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(guildNameWin));
|
||||||
if (pGEB == NULL) return;
|
if (pGEB == NULL) return;
|
||||||
|
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(IconWin));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(IconWin));
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
|
|
||||||
CGroupEditBox *pDesc = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(guildDescWin));
|
CGroupEditBox *pDesc = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(guildDescWin));
|
||||||
|
|
||||||
ucstring guildName = pGEB->getInputString();
|
ucstring guildName = pGEB->getInputString();
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ void CBotChatPageDynamicMission::begin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, true);
|
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, true);
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION));
|
||||||
if (!ig)
|
if (!ig)
|
||||||
{
|
{
|
||||||
std::fill(_ChoiceCB, _ChoiceCB + DYNAMIC_MISSION_NUM_CHOICES, (CDBGroupComboBox *) NULL);
|
std::fill(_ChoiceCB, _ChoiceCB + DYNAMIC_MISSION_NUM_CHOICES, (CDBGroupComboBox *) NULL);
|
||||||
|
@ -122,7 +122,7 @@ void CBotChatPageDynamicMission::end()
|
||||||
{
|
{
|
||||||
// if a menu is currently poped, disable it
|
// if a menu is currently poped, disable it
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, false);
|
activateWindow(WIN_BOT_CHAT_PAGE_DYNAMIC_MISSION, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ void CBotChatPageMission::begin()
|
||||||
// Select the Mission Aspect according to mission type
|
// Select the Mission Aspect according to mission type
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION:MISSION_TYPE")->setValue32(_MType);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:MISSION:MISSION_TYPE")->setValue32(_MType);
|
||||||
|
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
// show the ui
|
// show the ui
|
||||||
|
@ -96,7 +96,7 @@ void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
||||||
if (missionSheet->getGrayed()) return;
|
if (missionSheet->getGrayed()) return;
|
||||||
// show the dialog with good infos
|
// show the dialog with good infos
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_ACCEPT_MISSION));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_ACCEPT_MISSION));
|
||||||
|
|
||||||
// copy text id for title
|
// copy text id for title
|
||||||
{
|
{
|
||||||
|
@ -123,7 +123,7 @@ void CBotChatPageMission::selectMission(CDBCtrlSheet *missionSheet)
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
gc->updateCoords();
|
gc->updateCoords();
|
||||||
gc->center();
|
gc->center();
|
||||||
|
|
|
@ -40,7 +40,7 @@ void CBotChatPageMissionEnd::begin()
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
uint flags = CBotChatManager::getInstance().getChosenMissionFlags();
|
uint flags = CBotChatManager::getInstance().getChosenMissionFlags();
|
||||||
// reward text
|
// reward text
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION_END));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_PAGE_MISSION_END));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
CInterfaceGroup *rewardText = ig->getGroup("reward_text");
|
CInterfaceGroup *rewardText = ig->getGroup("reward_text");
|
||||||
if (rewardText)
|
if (rewardText)
|
||||||
|
|
|
@ -97,7 +97,7 @@ public:
|
||||||
{
|
{
|
||||||
CSheetHelpSetup helpSetup;
|
CSheetHelpSetup helpSetup;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
fillHelpSetupInfosForTrade(helpSetup, Sheet, ig);
|
fillHelpSetupInfosForTrade(helpSetup, Sheet, ig);
|
||||||
refreshItemHelp(helpSetup);
|
refreshItemHelp(helpSetup);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ void CBotChatPageTrade::init()
|
||||||
void CBotChatPageTrade::invalidateCoords()
|
void CBotChatPageTrade::invalidateCoords()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
// invalidate buy group
|
// invalidate buy group
|
||||||
gc->invalidateCoords();
|
gc->invalidateCoords();
|
||||||
|
@ -241,7 +241,7 @@ void CBotChatPageTrade::begin()
|
||||||
_DownloadComplete = false;
|
_DownloadComplete = false;
|
||||||
|
|
||||||
// update interface
|
// update interface
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(pIM->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
// set the title
|
// set the title
|
||||||
|
@ -323,7 +323,7 @@ uint32 CBotChatPageTrade::getCurrItemQuantity() const
|
||||||
itemSheet->Family != ITEMFAMILY::GUILD_OPTION)
|
itemSheet->Family != ITEMFAMILY::GUILD_OPTION)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return std::numeric_limits<uint32>::max();
|
if (!ig) return std::numeric_limits<uint32>::max();
|
||||||
// TODO: edit box in faction points?
|
// TODO: edit box in faction points?
|
||||||
CGroupEditBox *ed = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:standard_price:quantity:edit:eb"));
|
CGroupEditBox *ed = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:standard_price:quantity:edit:eb"));
|
||||||
|
@ -357,7 +357,7 @@ uint32 CBotChatPageTrade::getCurrItemPriceResale() const
|
||||||
// const CItemSheet *itemSheet = _CurrItemSheet->asItemSheet();
|
// const CItemSheet *itemSheet = _CurrItemSheet->asItemSheet();
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the edited resale price
|
// get the edited resale price
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return 0;
|
if (!ig) return 0;
|
||||||
CGroupEditBox *resaleMarginBox = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
CGroupEditBox *resaleMarginBox = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
||||||
if (!resaleMarginBox) return 0;
|
if (!resaleMarginBox) return 0;
|
||||||
|
@ -506,7 +506,7 @@ uint32 CBotChatPageTrade::getUserFactionPoints(PVP_CLAN::TPVPClan clan) const
|
||||||
void CBotChatPageTrade::notifyDownloadComplete(bool completed)
|
void CBotChatPageTrade::notifyDownloadComplete(bool completed)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
class CDBListVisitor : public CInterfaceElementVisitor
|
class CDBListVisitor : public CInterfaceElementVisitor
|
||||||
{
|
{
|
||||||
|
@ -552,7 +552,7 @@ void CBotChatPageTrade::updateTradeModal()
|
||||||
}
|
}
|
||||||
// get pointers on interface elements
|
// get pointers on interface elements
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
CInterfaceGroup *confirmTradeGroup = ig->getGroup("confirm_trade");
|
CInterfaceGroup *confirmTradeGroup = ig->getGroup("confirm_trade");
|
||||||
CCtrlBase *confirmResellGroup = ig->getCtrl("confirm_trade_resell");
|
CCtrlBase *confirmResellGroup = ig->getCtrl("confirm_trade_resell");
|
||||||
CInterfaceGroup *cantTradeGroup = ig->getGroup("cant_trade");
|
CInterfaceGroup *cantTradeGroup = ig->getGroup("cant_trade");
|
||||||
|
@ -841,7 +841,7 @@ void CBotChatPageTrade::startBuyDialog(CDBCtrlSheet *sheet, CCtrlBase * /* pCall
|
||||||
{
|
{
|
||||||
if (!sheet) return;
|
if (!sheet) return;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
|
|
||||||
// don't know why but in some case, the sheetId is 0
|
// don't know why but in some case, the sheetId is 0
|
||||||
|
@ -922,7 +922,7 @@ void CBotChatPageTrade::startBuyDialog(CDBCtrlSheet *sheet, CCtrlBase * /* pCall
|
||||||
ig->updateCoords();
|
ig->updateCoords();
|
||||||
ig->center();
|
ig->center();
|
||||||
ig->setModalParentList(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE);
|
ig->setModalParentList(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE);
|
||||||
im->setTopWindow(ig);
|
CWidgetManager::getInstance()->setTopWindow(ig);
|
||||||
//
|
//
|
||||||
_CurrItemSheet = sheet;
|
_CurrItemSheet = sheet;
|
||||||
_CurrItemIndex = sheet->getIndexInDB();
|
_CurrItemIndex = sheet->getIndexInDB();
|
||||||
|
@ -949,7 +949,7 @@ void CBotChatPageTrade::updateSPhraseBuyDialog()
|
||||||
|
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(pIM->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
|
|
||||||
CSheetHelpSetup helpSetup;
|
CSheetHelpSetup helpSetup;
|
||||||
|
@ -963,7 +963,7 @@ void CBotChatPageTrade::startSellDialog(CDBCtrlSheet *sheet, CCtrlBase * /* pCal
|
||||||
nlassert(!_BuyOnly);
|
nlassert(!_BuyOnly);
|
||||||
if (!sheet) return;
|
if (!sheet) return;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
|
|
||||||
// If this sheet is grayed cause of an "Animal Inventory unavailable" flag, quit
|
// If this sheet is grayed cause of an "Animal Inventory unavailable" flag, quit
|
||||||
|
@ -1020,7 +1020,7 @@ void CBotChatPageTrade::startSellDialog(CDBCtrlSheet *sheet, CCtrlBase * /* pCal
|
||||||
ig->updateCoords();
|
ig->updateCoords();
|
||||||
ig->center();
|
ig->center();
|
||||||
ig->setModalParentList(WIN_BOT_CHAT_PAGE_TRADE);
|
ig->setModalParentList(WIN_BOT_CHAT_PAGE_TRADE);
|
||||||
im->setTopWindow(ig);
|
CWidgetManager::getInstance()->setTopWindow(ig);
|
||||||
//
|
//
|
||||||
_CurrItemSheet = sheet;
|
_CurrItemSheet = sheet;
|
||||||
_CurrItemIndex = sheet->getIndexInDB();
|
_CurrItemIndex = sheet->getIndexInDB();
|
||||||
|
@ -1048,7 +1048,7 @@ void CBotChatPageTrade::endTradeModal()
|
||||||
|
|
||||||
// hide the dialog
|
// hide the dialog
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(pIM->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CGroupContainer *ig = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (ig) ig->setActive(false);
|
if (ig) ig->setActive(false);
|
||||||
|
|
||||||
// Hide any confirmation dialog related to trade (important for building MessageBox confirmation)
|
// Hide any confirmation dialog related to trade (important for building MessageBox confirmation)
|
||||||
|
@ -1056,7 +1056,7 @@ void CBotChatPageTrade::endTradeModal()
|
||||||
if(pIM->getCurrentValidMessageBoxOnOk(vmbOnOk))
|
if(pIM->getCurrentValidMessageBoxOnOk(vmbOnOk))
|
||||||
{
|
{
|
||||||
if(vmbOnOk=="confirm_trade")
|
if(vmbOnOk=="confirm_trade")
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1296,7 +1296,7 @@ void CBotChatPageTrade::confirmTrade( bool enableResale )
|
||||||
if ( _ResaleEdit )
|
if ( _ResaleEdit )
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (ig)
|
if (ig)
|
||||||
{
|
{
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
||||||
|
@ -1706,7 +1706,7 @@ void CBotChatPageTrade::startChangeBuyFilterDialog(const std::string &dbext, con
|
||||||
_FilterBuyDlgMaxValue= maxValue;
|
_FilterBuyDlgMaxValue= maxValue;
|
||||||
|
|
||||||
// change the title
|
// change the title
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
CViewText *vtitle= dynamic_cast<CViewText*>(ig->getView("title"));
|
CViewText *vtitle= dynamic_cast<CViewText*>(ig->getView("title"));
|
||||||
if(vtitle)
|
if(vtitle)
|
||||||
|
@ -1730,7 +1730,7 @@ void CBotChatPageTrade::startChangeBuyFilterDialog(const std::string &dbext, con
|
||||||
setFocusOnEditBox(ig->getGroup("edit_min:eb"));
|
setFocusOnEditBox(ig->getGroup("edit_min:eb"));
|
||||||
|
|
||||||
// go
|
// go
|
||||||
pIM->enableModalWindow(NULL, ig);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, ig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -1739,7 +1739,7 @@ void CBotChatPageTrade::resetBuyFilterDialog()
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// get the modal window
|
// get the modal window
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// reset the edited values
|
// reset the edited values
|
||||||
|
@ -1759,7 +1759,7 @@ void CBotChatPageTrade::resetBuyFilterDialog()
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -1768,7 +1768,7 @@ void CBotChatPageTrade::confirmChangeBuyFilterDialog()
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// get the modal window
|
// get the modal window
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// retrieve the edited values
|
// retrieve the edited values
|
||||||
|
@ -1792,7 +1792,7 @@ void CBotChatPageTrade::confirmChangeBuyFilterDialog()
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -1801,7 +1801,7 @@ void CBotChatPageTrade::giveFocusToMaxEBChangeBuyFilterDialog()
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// get the modal window
|
// get the modal window
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// set focus on max
|
// set focus on max
|
||||||
|
@ -1815,11 +1815,11 @@ void CBotChatPageTrade::startChangeBuyFilterMPDialog()
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_MP));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_MP));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// go
|
// go
|
||||||
pIM->enableModalWindow(NULL, ig);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, ig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1837,7 +1837,7 @@ void CBotChatPageTrade::confirmChangeBuyFilterMPDialog(uint ft)
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1915,7 +1915,7 @@ void CBotChatPageTrade::sendCurrentBuyFilterToServer(bool resetBuyList)
|
||||||
_TradePagesObs.start();
|
_TradePagesObs.start();
|
||||||
|
|
||||||
// update interface
|
// update interface
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(pIM->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
// unselect just buy list (don't need for sell)
|
// unselect just buy list (don't need for sell)
|
||||||
|
@ -1989,7 +1989,7 @@ void CBotChatPageTrade::refreshResale()
|
||||||
_TradePagesObs.start();
|
_TradePagesObs.start();
|
||||||
|
|
||||||
// update interface
|
// update interface
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(pIM->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(_BuyOnly ? WIN_BOT_CHAT_PAGE_BUY : WIN_BOT_CHAT_PAGE_TRADE));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
// unselect just buy list (don't need for sell)
|
// unselect just buy list (don't need for sell)
|
||||||
|
@ -2013,11 +2013,11 @@ void CBotChatPageTrade::startChangeBuyFilterClassDialog()
|
||||||
if(dbClassMax) tempClassMax->setValue32(dbClassMax->getValue32());
|
if(dbClassMax) tempClassMax->setValue32(dbClassMax->getValue32());
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_CLASS));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_CLASS));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// go
|
// go
|
||||||
pIM->enableModalWindow(NULL, ig);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, ig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2041,7 +2041,7 @@ void CBotChatPageTrade::resetBuyFilterClassDialog()
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -2066,7 +2066,7 @@ void CBotChatPageTrade::confirmChangeBuyFilterClassDialog()
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2091,11 +2091,11 @@ void CBotChatPageTrade::startChangeBuyFilterItemTypeDialog()
|
||||||
// the list of possible item type to select is filled when the DB of bitfield change
|
// the list of possible item type to select is filled when the DB of bitfield change
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_ITEM_TYPE));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_CHANGE_BUY_FILTER_ITEM_TYPE));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
|
|
||||||
// go
|
// go
|
||||||
pIM->enableModalWindow(NULL, ig);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, ig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -2111,7 +2111,7 @@ void CBotChatPageTrade::confirmChangeBuyFilterItemTypeDialog(ITEM_TYPE::TItemTy
|
||||||
sendCurrentBuyFilterToServer(true);
|
sendCurrentBuyFilterToServer(true);
|
||||||
|
|
||||||
// and leave modal
|
// and leave modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -2132,9 +2132,9 @@ void CBotChatPageTrade::startDestroyItemDialog()
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TRADE_ITEM:DESTROY_QUANTITY")->setValue32(quantity);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TRADE_ITEM:DESTROY_QUANTITY")->setValue32(quantity);
|
||||||
|
|
||||||
// show the modal
|
// show the modal
|
||||||
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_BOT_CHAT_DESTROY_ITEM));
|
CInterfaceGroup *ig= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_DESTROY_ITEM));
|
||||||
if(!ig) return;
|
if(!ig) return;
|
||||||
pIM->enableModalWindow(NULL, ig);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, ig);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -2190,7 +2190,7 @@ void CBotChatPageTrade::confirmDestroyItemDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
// in all cases, close the modal
|
// in all cases, close the modal
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
|
|
||||||
// if the quantity entered was correct
|
// if the quantity entered was correct
|
||||||
if(quantity!=0 && quantity!=std::numeric_limits<uint32>::max())
|
if(quantity!=0 && quantity!=std::numeric_limits<uint32>::max())
|
||||||
|
@ -2551,7 +2551,7 @@ class CAHBotChatChangeResaleMargin : public IActionHandler
|
||||||
virtual void execute(CCtrlBase * /* pCaller */, const std::string &sParams)
|
virtual void execute(CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_BOT_CHAT_SELL_BUY_ITEM));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
CGroupEditBox *resaleMarginBox = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
CGroupEditBox *resaleMarginBox = dynamic_cast<CGroupEditBox *>(ig->getGroup("header_opened:resell_group:can_resell:choose_resell:edit:eb"));
|
||||||
if (resaleMarginBox)
|
if (resaleMarginBox)
|
||||||
|
|
|
@ -92,7 +92,7 @@ bool CChatWindow::create(const CChatWindowDesc &desc, const std::string &chatId)
|
||||||
{
|
{
|
||||||
if (desc.FatherContainer != "ui:interface" )
|
if (desc.FatherContainer != "ui:interface" )
|
||||||
{
|
{
|
||||||
fatherContainer = dynamic_cast<CGroupContainer *>(im->getElementFromId(desc.FatherContainer));
|
fatherContainer = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(desc.FatherContainer));
|
||||||
if (!fatherContainer)
|
if (!fatherContainer)
|
||||||
{
|
{
|
||||||
nlwarning("<CChatWindow::create> Can't get father group, or bad type");
|
nlwarning("<CChatWindow::create> Can't get father group, or bad type");
|
||||||
|
@ -143,7 +143,7 @@ bool CChatWindow::create(const CChatWindowDesc &desc, const std::string &chatId)
|
||||||
_EB->setAHOnEnter("chat_box_entry");
|
_EB->setAHOnEnter("chat_box_entry");
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
|
|
||||||
if (fatherContainer)
|
if (fatherContainer)
|
||||||
{
|
{
|
||||||
|
@ -289,7 +289,7 @@ void CChatWindow::deleteContainer()
|
||||||
proprietaryContainer->detachContainer(_Chat); // just detach
|
proprietaryContainer->detachContainer(_Chat); // just detach
|
||||||
}
|
}
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
pRoot->delGroup (_Chat);
|
pRoot->delGroup (_Chat);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -667,7 +667,7 @@ void CChatGroupWindow::displayTellMessage(const ucstring &msg, NLMISC::CRGBA col
|
||||||
|
|
||||||
gcChat->requireAttention();
|
gcChat->requireAttention();
|
||||||
|
|
||||||
CInterfaceManager::getInstance()->setTopWindow(gcChat);
|
CWidgetManager::getInstance()->setTopWindow(gcChat);
|
||||||
|
|
||||||
// add the text to this window
|
// add the text to this window
|
||||||
CGroupList *gl = dynamic_cast<CGroupList *>(gcChat->getGroup("text_list"));
|
CGroupList *gl = dynamic_cast<CGroupList *>(gcChat->getGroup("text_list"));
|
||||||
|
@ -769,7 +769,7 @@ CGroupContainer *CChatGroupWindow::createFreeTeller(const ucstring &winNameIn, c
|
||||||
pGC->setSavable(true);
|
pGC->setSavable(true);
|
||||||
pGC->setEscapable(true);
|
pGC->setEscapable(true);
|
||||||
|
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
pRoot->addGroup (pGC);
|
pRoot->addGroup (pGC);
|
||||||
pGC->setParent(pRoot); // must be done before makeWindow
|
pGC->setParent(pRoot); // must be done before makeWindow
|
||||||
pIM->makeWindow(pGC);
|
pIM->makeWindow(pGC);
|
||||||
|
@ -896,7 +896,7 @@ bool CChatGroupWindow::removeFreeTeller(const std::string &containerID)
|
||||||
{
|
{
|
||||||
pIM->removeGroupContainerImage(_FreeTellers[i]->getId(), m);
|
pIM->removeGroupContainerImage(_FreeTellers[i]->getId(), m);
|
||||||
}
|
}
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
pIM->unMakeWindow(_FreeTellers[i]);
|
pIM->unMakeWindow(_FreeTellers[i]);
|
||||||
pRoot->delGroup (_FreeTellers[i]);
|
pRoot->delGroup (_FreeTellers[i]);
|
||||||
_FreeTellers[i] = NULL;
|
_FreeTellers[i] = NULL;
|
||||||
|
@ -1377,7 +1377,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
std::string callerId = getParam(sParams, "id");
|
std::string callerId = getParam(sParams, "id");
|
||||||
CInterfaceElement *prevCaller = im->getElementFromId(callerId);
|
CInterfaceElement *prevCaller = CWidgetManager::getInstance()->getElementFromId(callerId);
|
||||||
ucstring playerName = ::getFreeTellerName(prevCaller);
|
ucstring playerName = ::getFreeTellerName(prevCaller);
|
||||||
if (!playerName.empty())
|
if (!playerName.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -288,7 +288,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
|
||||||
|
|
||||||
// Run Menu
|
// Run Menu
|
||||||
if (!_ListMenuLeft.empty())
|
if (!_ListMenuLeft.empty())
|
||||||
pIM->enableModalWindow (this, _ListMenuLeft);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuLeft);
|
||||||
|
|
||||||
if (_AHOnLeftDblClick != NULL)
|
if (_AHOnLeftDblClick != NULL)
|
||||||
{
|
{
|
||||||
|
@ -323,7 +323,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
|
||||||
if (!_ListMenuRight .empty())
|
if (!_ListMenuRight .empty())
|
||||||
{
|
{
|
||||||
handled= true;
|
handled= true;
|
||||||
pIM->enableModalWindow (this, _ListMenuRight);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuRight);
|
||||||
}
|
}
|
||||||
// If not handled here, ret to parent
|
// If not handled here, ret to parent
|
||||||
return handled;
|
return handled;
|
||||||
|
|
|
@ -167,9 +167,9 @@ bool CCtrlScroll::parse(xmlNodePtr node, CInterfaceGroup * parentGroup)
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(prop));
|
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(prop));
|
||||||
if(group == NULL)
|
if(group == NULL)
|
||||||
group = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(this->getId(), prop));
|
group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(this->getId(), prop));
|
||||||
|
|
||||||
if(group != NULL)
|
if(group != NULL)
|
||||||
setTarget (group);
|
setTarget (group);
|
||||||
|
@ -210,7 +210,7 @@ int CCtrlScroll::luaSetTarget(CLuaState &ls)
|
||||||
std::string targetId = ls.toString(1);
|
std::string targetId = ls.toString(1);
|
||||||
|
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(targetId));
|
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(targetId));
|
||||||
if(group != NULL)
|
if(group != NULL)
|
||||||
{
|
{
|
||||||
setTarget (group);
|
setTarget (group);
|
||||||
|
|
|
@ -1858,11 +1858,11 @@ void CDBCtrlSheet::draw()
|
||||||
if (_AHOnCanDrop != NULL)
|
if (_AHOnCanDrop != NULL)
|
||||||
if ((pIM->getCapturePointerLeft() != NULL) && (pIM->getCapturePointerLeft() != this))
|
if ((pIM->getCapturePointerLeft() != NULL) && (pIM->getCapturePointerLeft() != this))
|
||||||
{
|
{
|
||||||
if ((pIM->getPointer()->getX() >= _XReal) &&
|
if ((CWidgetManager::getInstance()->getPointer()->getX() >= _XReal) &&
|
||||||
(pIM->getPointer()->getX() < (_XReal + _WReal))&&
|
(CWidgetManager::getInstance()->getPointer()->getX() < (_XReal + _WReal))&&
|
||||||
(pIM->getPointer()->getY() > _YReal) &&
|
(CWidgetManager::getInstance()->getPointer()->getY() > _YReal) &&
|
||||||
(pIM->getPointer()->getY() <= (_YReal+ _HReal)))
|
(CWidgetManager::getInstance()->getPointer()->getY() <= (_YReal+ _HReal)))
|
||||||
if (pIM->getCurrentWindowUnder() == pIM->getWindow(this))
|
if (pIM->getCurrentWindowUnder() == CWidgetManager::getInstance()->getWindow(this))
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
||||||
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
||||||
|
@ -2861,7 +2861,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
if (getSheetId() != 0)
|
if (getSheetId() != 0)
|
||||||
{
|
{
|
||||||
_CurrMenuSheet = this;
|
_CurrMenuSheet = this;
|
||||||
pIM->enableModalWindow (this, _ListMenuLeft);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuLeft);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Always return true on LeftClick.
|
// Always return true on LeftClick.
|
||||||
|
@ -2899,7 +2899,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
if(!_ListMenuRight.empty())
|
if(!_ListMenuRight.empty())
|
||||||
{
|
{
|
||||||
_CurrMenuSheet = this;
|
_CurrMenuSheet = this;
|
||||||
pIM->enableModalWindow (this, _ListMenuRight);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuRight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if sheetId==0, then may open the other menu
|
// if sheetId==0, then may open the other menu
|
||||||
|
@ -2908,7 +2908,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
if(!_ListMenuRightEmptySlot.empty())
|
if(!_ListMenuRightEmptySlot.empty())
|
||||||
{
|
{
|
||||||
_CurrMenuSheet = this;
|
_CurrMenuSheet = this;
|
||||||
pIM->enableModalWindow (this, _ListMenuRightEmptySlot);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuRightEmptySlot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3638,7 +3638,7 @@ void CDBCtrlSheet::setupInit()
|
||||||
{
|
{
|
||||||
// typically replace "handl" with "handr" or vice versa
|
// typically replace "handl" with "handr" or vice versa
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId (_Id, _OptString);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId (_Id, _OptString);
|
||||||
CDBCtrlSheet *pOtherHand = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pOtherHand = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
if( !pOtherHand || pOtherHand ->getType() != CCtrlSheetInfo::SheetType_Item )
|
if( !pOtherHand || pOtherHand ->getType() != CCtrlSheetInfo::SheetType_Item )
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@ sint32 CDBGroupComboBox::evalContentWidth() const
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// get the menu to open.
|
// get the menu to open.
|
||||||
CGroupMenu *groupMenu= dynamic_cast<CGroupMenu*>(pIM->getElementFromId( loginFinished ? WIN_COMBO_BOX_MEASURE_MENU : WIN_COMBO_BOX_MEASURE_MENU_LOGIN ));
|
CGroupMenu *groupMenu= dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId( loginFinished ? WIN_COMBO_BOX_MEASURE_MENU : WIN_COMBO_BOX_MEASURE_MENU_LOGIN ));
|
||||||
if( !groupMenu )
|
if( !groupMenu )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -551,10 +551,10 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// get the menu to open.
|
// get the menu to open.
|
||||||
CGroupMenu *groupMenu= dynamic_cast<CGroupMenu*>(pIM->getElementFromId(loginFinished ? WIN_COMBO_BOX_SELECT_MENU: WIN_COMBO_BOX_SELECT_MENU_LOGIN ));
|
CGroupMenu *groupMenu= dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId(loginFinished ? WIN_COMBO_BOX_SELECT_MENU: WIN_COMBO_BOX_SELECT_MENU_LOGIN ));
|
||||||
if( !groupMenu )
|
if( !groupMenu )
|
||||||
{
|
{
|
||||||
groupMenu= dynamic_cast<CGroupMenu*>(pIM->getElementFromId(WIN_COMBO_BOX_SELECT_MENU_OUTGAME));
|
groupMenu= dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId(WIN_COMBO_BOX_SELECT_MENU_OUTGAME));
|
||||||
}
|
}
|
||||||
if( !groupMenu )
|
if( !groupMenu )
|
||||||
return;
|
return;
|
||||||
|
@ -586,12 +586,12 @@ public:
|
||||||
if(dynamic_cast<CGroupModal*>(pCB->getRootWindow()))
|
if(dynamic_cast<CGroupModal*>(pCB->getRootWindow()))
|
||||||
{
|
{
|
||||||
groupMenu->setCloseSubMenuUsingPopModal(true);
|
groupMenu->setCloseSubMenuUsingPopModal(true);
|
||||||
pIM->pushModalWindow(pCB, groupMenu);
|
CWidgetManager::getInstance()->pushModalWindow(pCB, groupMenu);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
groupMenu->setCloseSubMenuUsingPopModal(false);
|
groupMenu->setCloseSubMenuUsingPopModal(false);
|
||||||
pIM->enableModalWindow (pCB, groupMenu);
|
CWidgetManager::getInstance()->enableModalWindow (pCB, groupMenu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -607,7 +607,7 @@ public:
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params)
|
virtual void execute (CCtrlBase * /* pCaller */, const std::string &Params)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getCtrlLaunchingModal());
|
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCB == NULL) return;
|
if (pCB == NULL) return;
|
||||||
|
|
||||||
// set the selection
|
// set the selection
|
||||||
|
|
|
@ -252,7 +252,7 @@ sint CDBGroupListSheet::getCurScrollValue()
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CGroupContainer *CDBGroupListSheet::getContainer()
|
CGroupContainer *CDBGroupListSheet::getContainer()
|
||||||
{
|
{
|
||||||
return dynamic_cast<CGroupContainer*>(CInterfaceManager::getInstance()->getWindow(this));
|
return dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getWindow(this));
|
||||||
/* CGroupContainer *pGC = NULL;
|
/* CGroupContainer *pGC = NULL;
|
||||||
CInterfaceGroup *pParent = getParent();
|
CInterfaceGroup *pParent = getParent();
|
||||||
while (pParent != NULL)
|
while (pParent != NULL)
|
||||||
|
@ -326,7 +326,7 @@ void CDBGroupListSheet::updateCoords ()
|
||||||
if (_DisplayEmptySlot)
|
if (_DisplayEmptySlot)
|
||||||
{
|
{
|
||||||
// increment num sheet if the empty slot is to be displayed
|
// increment num sheet if the empty slot is to be displayed
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS != NULL && pCS->isSheetValid()) ++numValidSheets;
|
if (pCS != NULL && pCS->isSheetValid()) ++numValidSheets;
|
||||||
}
|
}
|
||||||
_ColumnMax = (uint) (ceil(sqrtf((float) numValidSheets)));
|
_ColumnMax = (uint) (ceil(sqrtf((float) numValidSheets)));
|
||||||
|
@ -388,7 +388,7 @@ void CDBGroupListSheet::updateCoords ()
|
||||||
if ( (_DisplayEmptySlot) && (i == 0) )
|
if ( (_DisplayEmptySlot) && (i == 0) )
|
||||||
{
|
{
|
||||||
_SheetChildren[i]->Valid= true;
|
_SheetChildren[i]->Valid= true;
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS != NULL)
|
if (pCS != NULL)
|
||||||
{
|
{
|
||||||
ctrl->setTextureNoItem (pCS->getTextureNoItem());
|
ctrl->setTextureNoItem (pCS->getTextureNoItem());
|
||||||
|
@ -716,10 +716,10 @@ void CDBGroupListSheet::draw ()
|
||||||
CGroupContainer *pGC = getContainer();
|
CGroupContainer *pGC = getContainer();
|
||||||
if (pIM->getCurrentWindowUnder() == pGC)
|
if (pIM->getCurrentWindowUnder() == pGC)
|
||||||
{
|
{
|
||||||
if ((pIM->getPointer()->getX() >= _XReal) &&
|
if ((CWidgetManager::getInstance()->getPointer()->getX() >= _XReal) &&
|
||||||
(pIM->getPointer()->getX() < (_XReal + _WReal))&&
|
(CWidgetManager::getInstance()->getPointer()->getX() < (_XReal + _WReal))&&
|
||||||
(pIM->getPointer()->getY() > _YReal) &&
|
(CWidgetManager::getInstance()->getPointer()->getY() > _YReal) &&
|
||||||
(pIM->getPointer()->getY() <= (_YReal+ _HReal)))
|
(CWidgetManager::getInstance()->getPointer()->getY() <= (_YReal+ _HReal)))
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
||||||
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
||||||
|
@ -942,7 +942,7 @@ sint32 CDBGroupListSheet::getNbElt () const
|
||||||
// special display empty slot
|
// special display empty slot
|
||||||
if ( (_DisplayEmptySlot) && (i == 0) )
|
if ( (_DisplayEmptySlot) && (i == 0) )
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (pCS != NULL)
|
if (pCS != NULL)
|
||||||
{
|
{
|
||||||
ctrl->setTextureNoItem (pCS->getTextureNoItem());
|
ctrl->setTextureNoItem (pCS->getTextureNoItem());
|
||||||
|
|
|
@ -626,10 +626,10 @@ void CDBGroupListSheetText::draw ()
|
||||||
CGroupContainer *pGC = getContainer();
|
CGroupContainer *pGC = getContainer();
|
||||||
if (pIM->getCurrentWindowUnder() == pGC)
|
if (pIM->getCurrentWindowUnder() == pGC)
|
||||||
{
|
{
|
||||||
if ((pIM->getPointer()->getX() >= _XReal) &&
|
if ((CWidgetManager::getInstance()->getPointer()->getX() >= _XReal) &&
|
||||||
(pIM->getPointer()->getX() < (_XReal + _WReal))&&
|
(CWidgetManager::getInstance()->getPointer()->getX() < (_XReal + _WReal))&&
|
||||||
(pIM->getPointer()->getY() > _YReal) &&
|
(CWidgetManager::getInstance()->getPointer()->getY() > _YReal) &&
|
||||||
(pIM->getPointer()->getY() <= (_YReal+ _HReal)))
|
(CWidgetManager::getInstance()->getPointer()->getY() <= (_YReal+ _HReal)))
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pIM->getCapturePointerLeft());
|
||||||
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
if ((pCSSrc != NULL) && pCSSrc->isDraging())
|
||||||
|
@ -1008,7 +1008,7 @@ void CDBGroupListSheetText::CSheetChild::hide(CDBGroupListSheetText * /* pFather
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
CGroupContainer *CDBGroupListSheetText::getContainer()
|
CGroupContainer *CDBGroupListSheetText::getContainer()
|
||||||
{
|
{
|
||||||
return dynamic_cast<CGroupContainer*>(CInterfaceManager::getInstance()->getWindow(this));
|
return dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getWindow(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -1184,7 +1184,7 @@ class CHandlerListSheetTextRightClick : public IActionHandler
|
||||||
{
|
{
|
||||||
if ( CDBCtrlSheet::getDraggedSheet() == NULL)
|
if ( CDBCtrlSheet::getDraggedSheet() == NULL)
|
||||||
{
|
{
|
||||||
pIM->enableModalWindow (ctrlSheet, listSheetTrade->_CtrlInfo._ListMenuRight);
|
CWidgetManager::getInstance()->enableModalWindow (ctrlSheet, listSheetTrade->_CtrlInfo._ListMenuRight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1201,7 +1201,7 @@ class CHandlerListSheetTextResetSelection : public IActionHandler
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CDBGroupListSheetText *listSheetTrade = dynamic_cast<CDBGroupListSheetText*>(pIM->getElementFromId(Params));
|
CDBGroupListSheetText *listSheetTrade = dynamic_cast<CDBGroupListSheetText*>(CWidgetManager::getInstance()->getElementFromId(Params));
|
||||||
if (listSheetTrade == NULL)
|
if (listSheetTrade == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -264,7 +264,7 @@ class CHandlerTeamShareChoose : public IActionHandler
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CBitMemStream out;
|
CBitMemStream out;
|
||||||
|
|
||||||
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:team_share:content:ok"));
|
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share:content:ok"));
|
||||||
if (pTB == NULL) return;
|
if (pTB == NULL) return;
|
||||||
if (pTB->getActive() == false) return;
|
if (pTB->getActive() == false) return;
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ class CHandlerTeamShareValid : public IActionHandler
|
||||||
CBitMemStream out;
|
CBitMemStream out;
|
||||||
string strMsgName = "TEAM:SHARE_VALID";
|
string strMsgName = "TEAM:SHARE_VALID";
|
||||||
|
|
||||||
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:team_share:content:ok"));
|
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share:content:ok"));
|
||||||
if (pTB != NULL)
|
if (pTB != NULL)
|
||||||
pTB->setActive(false);
|
pTB->setActive(false);
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ void CEncyclopediaManager::updateThema(uint32 nAlbumName, const CEncyMsgThema &t
|
||||||
_AlbumNameSelected = nAlbumName;
|
_AlbumNameSelected = nAlbumName;
|
||||||
_ThemaNameSelected = t.Name;
|
_ThemaNameSelected = t.Name;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pContainer = dynamic_cast<CInterfaceElement*>(pIM->getElementFromId(CONT_ENCY));
|
CInterfaceElement *pContainer = dynamic_cast<CInterfaceElement*>(CWidgetManager::getInstance()->getElementFromId(CONT_ENCY));
|
||||||
if (pContainer != NULL)
|
if (pContainer != NULL)
|
||||||
pContainer->setActive(true);
|
pContainer->setActive(true);
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ void CEncyclopediaManager::rebuildAlbumList()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
|
|
||||||
CGroupTree *pTree = dynamic_cast<CGroupTree*>(pIM->getElementFromId(LIST_ENCY_ALBUM));
|
CGroupTree *pTree = dynamic_cast<CGroupTree*>(CWidgetManager::getInstance()->getElementFromId(LIST_ENCY_ALBUM));
|
||||||
nlassert(pTree != NULL);
|
nlassert(pTree != NULL);
|
||||||
|
|
||||||
CGroupTree::SNode *pRoot = new CGroupTree::SNode;
|
CGroupTree::SNode *pRoot = new CGroupTree::SNode;
|
||||||
|
@ -281,22 +281,22 @@ void CEncyclopediaManager::rebuildAlbumPage(uint32 albumName)
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// Hide and show good group
|
// Hide and show good group
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(PAGE_ENCY_ALBUM);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_ALBUM);
|
||||||
nlassert(pIE != NULL);
|
nlassert(pIE != NULL);
|
||||||
pIE->setActive(true);
|
pIE->setActive(true);
|
||||||
pIE = pIM->getElementFromId(PAGE_ENCY_HELP);
|
pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_HELP);
|
||||||
pIE->setActive(false);
|
pIE->setActive(false);
|
||||||
pIE = pIM->getElementFromId(PAGE_ENCY_THEMA);
|
pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_THEMA);
|
||||||
pIE->setActive(false);
|
pIE->setActive(false);
|
||||||
|
|
||||||
// Setup title
|
// Setup title
|
||||||
CViewTextID *pVT = dynamic_cast<CViewTextID*>(pIM->getElementFromId(PAGE_ENCY_ALBUM ":title"));
|
CViewTextID *pVT = dynamic_cast<CViewTextID*>(CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_ALBUM ":title"));
|
||||||
nlassert(pVT != NULL);
|
nlassert(pVT != NULL);
|
||||||
pVT->setTextId(pAlbum->Name);
|
pVT->setTextId(pAlbum->Name);
|
||||||
|
|
||||||
// Setup brick reward
|
// Setup brick reward
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:ALBUMBRICK:SHEET")->setValue32(pAlbum->RewardBrick);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:ALBUMBRICK:SHEET")->setValue32(pAlbum->RewardBrick);
|
||||||
CViewText *pRBVT = dynamic_cast<CViewText*>(pIM->getElementFromId(PAGE_ENCY_ALBUM ":reward:desc"));
|
CViewText *pRBVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_ALBUM ":reward:desc"));
|
||||||
if (pRBVT != NULL)
|
if (pRBVT != NULL)
|
||||||
{
|
{
|
||||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
|
@ -328,27 +328,27 @@ void CEncyclopediaManager::rebuildThemaPage(uint32 themaName)
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// Hide and show good group
|
// Hide and show good group
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(PAGE_ENCY_ALBUM);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_ALBUM);
|
||||||
nlassert(pIE != NULL);
|
nlassert(pIE != NULL);
|
||||||
pIE->setActive(false);
|
pIE->setActive(false);
|
||||||
pIE = pIM->getElementFromId(PAGE_ENCY_HELP);
|
pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_HELP);
|
||||||
pIE->setActive(false);
|
pIE->setActive(false);
|
||||||
pIE = pIM->getElementFromId(PAGE_ENCY_THEMA);
|
pIE = CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_THEMA);
|
||||||
pIE->setActive(true);
|
pIE->setActive(true);
|
||||||
|
|
||||||
// Setup title
|
// Setup title
|
||||||
CViewTextID *pVT = dynamic_cast<CViewTextID*>(pIM->getElementFromId(PAGE_ENCY_THEMA ":title"));
|
CViewTextID *pVT = dynamic_cast<CViewTextID*>(CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_THEMA ":title"));
|
||||||
nlassert(pVT != NULL);
|
nlassert(pVT != NULL);
|
||||||
pVT->setTextId(pThema->Name);
|
pVT->setTextId(pThema->Name);
|
||||||
|
|
||||||
// Setup rewards
|
// Setup rewards
|
||||||
pVT = dynamic_cast<CViewTextID*>(pIM->getElementFromId(PAGE_ENCY_THEMA ":reward_text:desc"));
|
pVT = dynamic_cast<CViewTextID*>(CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_THEMA ":reward_text:desc"));
|
||||||
nlassert(pVT != NULL);
|
nlassert(pVT != NULL);
|
||||||
pVT->setTextId(pThema->RewardText);
|
pVT->setTextId(pThema->RewardText);
|
||||||
|
|
||||||
// Setup brick reward
|
// Setup brick reward
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:REWARDBRICK:SHEET")->setValue32(pThema->RewardSheet);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:ENCY:REWARDBRICK:SHEET")->setValue32(pThema->RewardSheet);
|
||||||
CViewText *pRBVT = dynamic_cast<CViewText*>(pIM->getElementFromId(PAGE_ENCY_THEMA ":reward:desc"));
|
CViewText *pRBVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(PAGE_ENCY_THEMA ":reward:desc"));
|
||||||
nlassert(pRBVT != NULL);
|
nlassert(pRBVT != NULL);
|
||||||
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
STRING_MANAGER::CStringManagerClient *pSMC = STRING_MANAGER::CStringManagerClient::instance();
|
||||||
CEntitySheet *pES = SheetMngr.get(CSheetId(pThema->RewardSheet));
|
CEntitySheet *pES = SheetMngr.get(CSheetId(pThema->RewardSheet));
|
||||||
|
@ -392,7 +392,7 @@ void CEncyclopediaManager::rebuildThemaPage(uint32 themaName)
|
||||||
sTmp = PAGE_ENCY_THEMA ":todo:task" + toString(i);
|
sTmp = PAGE_ENCY_THEMA ":todo:task" + toString(i);
|
||||||
|
|
||||||
// setup task description
|
// setup task description
|
||||||
CViewTextID *pText = dynamic_cast<CViewTextID*>(pIM->getElementFromId(sTmp+":desc"));
|
CViewTextID *pText = dynamic_cast<CViewTextID*>(CWidgetManager::getInstance()->getElementFromId(sTmp+":desc"));
|
||||||
nlassert(pText != NULL);
|
nlassert(pText != NULL);
|
||||||
pText->setTextId(pThema->TaskName[i]);
|
pText->setTextId(pThema->TaskName[i]);
|
||||||
|
|
||||||
|
@ -407,7 +407,7 @@ void CEncyclopediaManager::rebuildThemaPage(uint32 themaName)
|
||||||
pText->setAlpha(160);
|
pText->setAlpha(160);
|
||||||
|
|
||||||
// If the task is finished toggle it
|
// If the task is finished toggle it
|
||||||
CViewBitmap *pBitmap = dynamic_cast<CViewBitmap*>(pIM->getElementFromId(sTmp+":done"));
|
CViewBitmap *pBitmap = dynamic_cast<CViewBitmap*>(CWidgetManager::getInstance()->getElementFromId(sTmp+":done"));
|
||||||
nlassert(pBitmap != NULL);
|
nlassert(pBitmap != NULL);
|
||||||
if (pThema->getTaskState((uint8)i) == 2)
|
if (pThema->getTaskState((uint8)i) == 2)
|
||||||
pBitmap->setActive(true);
|
pBitmap->setActive(true);
|
||||||
|
|
|
@ -926,9 +926,9 @@ class CHandlerSetCompas : public IActionHandler
|
||||||
std::string compassID = getParam(sParams, "compass");
|
std::string compassID = getParam(sParams, "compass");
|
||||||
std::string menuID = getParam(sParams, "menu");
|
std::string menuID = getParam(sParams, "menu");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId(compassID));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId(compassID));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
CGroupCompasMenu *gcm = dynamic_cast<CGroupCompasMenu *>(im->getElementFromId(menuID));
|
CGroupCompasMenu *gcm = dynamic_cast<CGroupCompasMenu *>(CWidgetManager::getInstance()->getElementFromId(menuID));
|
||||||
if (!gcm) return;
|
if (!gcm) return;
|
||||||
int index;
|
int index;
|
||||||
std::string id = getParam(sParams, "id");
|
std::string id = getParam(sParams, "id");
|
||||||
|
@ -938,7 +938,7 @@ class CHandlerSetCompas : public IActionHandler
|
||||||
gc->setTarget(gcm->Targets[index]);
|
gc->setTarget(gcm->Targets[index]);
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
gc->blink();
|
gc->blink();
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -967,13 +967,13 @@ class CHandlerSetTeamCompas : public IActionHandler
|
||||||
CCompassTarget ct;
|
CCompassTarget ct;
|
||||||
if(buildCompassTargetFromTeamMember(ct, peopleIndex))
|
if(buildCompassTargetFromTeamMember(ct, peopleIndex))
|
||||||
{
|
{
|
||||||
CGroupCompas *gc= dynamic_cast<CGroupCompas*>(pIM->getElementFromId(compassID));
|
CGroupCompas *gc= dynamic_cast<CGroupCompas*>(CWidgetManager::getInstance()->getElementFromId(compassID));
|
||||||
if(gc)
|
if(gc)
|
||||||
{
|
{
|
||||||
gc->setTarget(ct);
|
gc->setTarget(ct);
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
gc->blink();
|
gc->blink();
|
||||||
pIM->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -989,7 +989,7 @@ class CHandlerSetCompassNorth : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string compassID = getParam(sParams, "compass");
|
std::string compassID = getParam(sParams, "compass");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId(compassID));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId(compassID));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
gc->setTarget(CCompassTarget());
|
gc->setTarget(CCompassTarget());
|
||||||
}
|
}
|
||||||
|
|
|
@ -712,7 +712,7 @@ bool CCtrlMover::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
_MoveDeltaYReal= _Parent->getYReal() - _Parent->getY();
|
_MoveDeltaYReal= _Parent->getYReal() - _Parent->getY();
|
||||||
_Moving= true;
|
_Moving= true;
|
||||||
// set the window at top.
|
// set the window at top.
|
||||||
CInterfaceManager::getInstance()->setTopWindow(_Parent);
|
CWidgetManager::getInstance()->setTopWindow(_Parent);
|
||||||
if (gc->getAHOnBeginMovePtr())
|
if (gc->getAHOnBeginMovePtr())
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
@ -2086,7 +2086,7 @@ void CGroupContainer::draw ()
|
||||||
{
|
{
|
||||||
CRGBA c = CRGBA(255,255,255,255);
|
CRGBA c = CRGBA(255,255,255,255);
|
||||||
// Display the header in white if we are the last clicked window
|
// Display the header in white if we are the last clicked window
|
||||||
if (pIM->getTopWindow(pIM->getLastTopWindowPriority()) != this)
|
if (CWidgetManager::getInstance()->getTopWindow(CWidgetManager::getInstance()->getLastTopWindowPriority()) != this)
|
||||||
{
|
{
|
||||||
if (_HeaderColor.getNodePtr() != NULL)
|
if (_HeaderColor.getNodePtr() != NULL)
|
||||||
c = _HeaderColor.getRGBA();
|
c = _HeaderColor.getRGBA();
|
||||||
|
@ -2194,7 +2194,7 @@ void CGroupContainer::draw ()
|
||||||
|
|
||||||
|
|
||||||
// manage rollover
|
// manage rollover
|
||||||
CViewPointer *mousePointer = pIM->getPointer();
|
CViewPointer *mousePointer = CWidgetManager::getInstance()->getPointer();
|
||||||
if (mousePointer)
|
if (mousePointer)
|
||||||
{
|
{
|
||||||
bool dontFade = false;
|
bool dontFade = false;
|
||||||
|
@ -3204,9 +3204,9 @@ void CGroupContainer::setActive (bool state)
|
||||||
if(state != getActive() && getLayer()==0)
|
if(state != getActive() && getLayer()==0)
|
||||||
{
|
{
|
||||||
if (state)
|
if (state)
|
||||||
pIM->setTopWindow(this);
|
CWidgetManager::getInstance()->setTopWindow(this);
|
||||||
else
|
else
|
||||||
pIM->setBackWindow(this);
|
CWidgetManager::getInstance()->setBackWindow(this);
|
||||||
}
|
}
|
||||||
pIM->submitEvent((state?"show:":"hide:")+getId());
|
pIM->submitEvent((state?"show:":"hide:")+getId());
|
||||||
|
|
||||||
|
@ -3290,7 +3290,7 @@ void CGroupContainer::popupCurrentPos()
|
||||||
|
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->makeWindow(this);
|
im->makeWindow(this);
|
||||||
im->setTopWindow(this);
|
CWidgetManager::getInstance()->setTopWindow(this);
|
||||||
im->clearViewUnders();
|
im->clearViewUnders();
|
||||||
im->clearCtrlsUnders();
|
im->clearCtrlsUnders();
|
||||||
|
|
||||||
|
@ -3512,7 +3512,7 @@ public:
|
||||||
{
|
{
|
||||||
im->runActionHandler(pIC->getAHOnCloseButton(), pCaller, pIC->getAHOnCloseButtonParams());
|
im->runActionHandler(pIC->getAHOnCloseButton(), pCaller, pIC->getAHOnCloseButtonParams());
|
||||||
}
|
}
|
||||||
CInterfaceManager::getInstance()->setBackWindow(pIC);
|
CWidgetManager::getInstance()->setBackWindow(pIC);
|
||||||
pIC->setActive(false);
|
pIC->setActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3641,7 +3641,7 @@ void CGroupContainer::setOpenable(bool openable)
|
||||||
void CGroupContainer::rollOverAlphaUp()
|
void CGroupContainer::rollOverAlphaUp()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CViewPointer *vp = im->getPointer();
|
CViewPointer *vp = CWidgetManager::getInstance()->getPointer();
|
||||||
float speed = im->getAlphaRolloverSpeed();
|
float speed = im->getAlphaRolloverSpeed();
|
||||||
if (!isIn(vp->getX(), vp->getY()))
|
if (!isIn(vp->getX(), vp->getY()))
|
||||||
{
|
{
|
||||||
|
@ -3741,9 +3741,9 @@ void CGroupContainer::setModalParentList (const std::string &name)
|
||||||
// add each of them (if possible)
|
// add each of them (if possible)
|
||||||
for(uint i=0;i<modalParents.size();i++)
|
for(uint i=0;i<modalParents.size();i++)
|
||||||
{
|
{
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(modalParents[i]));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(modalParents[i]));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:"+modalParents[i]));
|
pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:"+modalParents[i]));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
nlwarning("<setModalParentList> not found %s",modalParents[i].c_str());
|
nlwarning("<setModalParentList> not found %s",modalParents[i].c_str());
|
||||||
else
|
else
|
||||||
|
@ -3944,7 +3944,7 @@ CRGBA CGroupContainer::getDrawnHeaderColor () const
|
||||||
CRGBA c = CRGBA(255,255,255,255);
|
CRGBA c = CRGBA(255,255,255,255);
|
||||||
|
|
||||||
// Display the header in white if we are the last clicked window
|
// Display the header in white if we are the last clicked window
|
||||||
if (pIM->getTopWindow(pIM->getLastTopWindowPriority()) != static_cast<const CInterfaceGroup*>(this))
|
if (CWidgetManager::getInstance()->getTopWindow(CWidgetManager::getInstance()->getLastTopWindowPriority()) != static_cast<const CInterfaceGroup*>(this))
|
||||||
{
|
{
|
||||||
if (_HeaderColor.getNodePtr() != NULL)
|
if (_HeaderColor.getNodePtr() != NULL)
|
||||||
c = _HeaderColor.getRGBA();
|
c = _HeaderColor.getRGBA();
|
||||||
|
@ -3974,7 +3974,7 @@ void CGroupContainer::requireAttention()
|
||||||
// Window have headers opened => blink it if is not the top window
|
// Window have headers opened => blink it if is not the top window
|
||||||
if (isOpen())
|
if (isOpen())
|
||||||
{
|
{
|
||||||
if (getId() != CInterfaceManager::getInstance()->getTopWindow()->getId())
|
if (getId() != CWidgetManager::getInstance()->getTopWindow()->getId())
|
||||||
{
|
{
|
||||||
enableBlink(3);
|
enableBlink(3);
|
||||||
}
|
}
|
||||||
|
|
|
@ -885,7 +885,7 @@ bool CGroupEditBox::handleEvent (const NLGUI::CEventDescriptor& event)
|
||||||
if (CDBCtrlSheet::getDraggedSheet() == NULL)
|
if (CDBCtrlSheet::getDraggedSheet() == NULL)
|
||||||
{
|
{
|
||||||
_MenuFather = this;
|
_MenuFather = this;
|
||||||
pIM->enableModalWindow (this, _ListMenuRight);
|
CWidgetManager::getInstance()->enableModalWindow (this, _ListMenuRight);
|
||||||
stopParentBlink();
|
stopParentBlink();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1307,7 +1307,7 @@ void CGroupEditBox::makeTopWindow()
|
||||||
CInterfaceGroup *root = getRootWindow();
|
CInterfaceGroup *root = getRootWindow();
|
||||||
if (root)
|
if (root)
|
||||||
{
|
{
|
||||||
im->setTopWindow(root);
|
CWidgetManager::getInstance()->setTopWindow(root);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,7 +418,7 @@ bool CGroupHeaderEntry::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
CInterfaceGroup *CGroupHeaderEntry::getTargetColumn() const
|
CInterfaceGroup *CGroupHeaderEntry::getTargetColumn() const
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
return dynamic_cast<CInterfaceGroup*>(im->getElementFromId(_TargetColumnId));
|
return dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(_TargetColumnId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// *****************************************************************************************************************
|
// *****************************************************************************************************************
|
||||||
|
|
|
@ -2221,7 +2221,7 @@ void CGroupHTML::doBrowse(const char *url)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CGroupTree *groupTree=dynamic_cast<CGroupTree*>(pIM->getElementFromId(_BrowseTree));
|
CGroupTree *groupTree=dynamic_cast<CGroupTree*>(CWidgetManager::getInstance()->getElementFromId(_BrowseTree));
|
||||||
if(groupTree)
|
if(groupTree)
|
||||||
{
|
{
|
||||||
string nodeId= selectTreeNodeRecurs(groupTree->getRootNode(), url);
|
string nodeId= selectTreeNodeRecurs(groupTree->getRootNode(), url);
|
||||||
|
@ -3634,8 +3634,8 @@ void CGroupHTML::browseRedo()
|
||||||
void CGroupHTML::updateUndoRedoButtons()
|
void CGroupHTML::updateUndoRedoButtons()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CCtrlBaseButton *butUndo= dynamic_cast<CCtrlBaseButton *>(pIM->getElementFromId(_BrowseUndoButton));
|
CCtrlBaseButton *butUndo= dynamic_cast<CCtrlBaseButton *>(CWidgetManager::getInstance()->getElementFromId(_BrowseUndoButton));
|
||||||
CCtrlBaseButton *butRedo= dynamic_cast<CCtrlBaseButton *>(pIM->getElementFromId(_BrowseRedoButton));
|
CCtrlBaseButton *butRedo= dynamic_cast<CCtrlBaseButton *>(CWidgetManager::getInstance()->getElementFromId(_BrowseRedoButton));
|
||||||
|
|
||||||
// gray according to list size
|
// gray according to list size
|
||||||
if(butUndo)
|
if(butUndo)
|
||||||
|
@ -3648,7 +3648,7 @@ void CGroupHTML::updateUndoRedoButtons()
|
||||||
void CGroupHTML::updateRefreshButton()
|
void CGroupHTML::updateRefreshButton()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CCtrlBaseButton *butRefresh = dynamic_cast<CCtrlBaseButton *>(pIM->getElementFromId(_BrowseRefreshButton));
|
CCtrlBaseButton *butRefresh = dynamic_cast<CCtrlBaseButton *>(CWidgetManager::getInstance()->getElementFromId(_BrowseRefreshButton));
|
||||||
|
|
||||||
bool enabled = !_Browsing && !_Connecting;
|
bool enabled = !_Browsing && !_Connecting;
|
||||||
if(butRefresh)
|
if(butRefresh)
|
||||||
|
|
|
@ -56,7 +56,7 @@ void CGroupHTMLQCM::addText (const char * buf, int len)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
pIM->runActionHandler("quit_ryzom", NULL);
|
pIM->runActionHandler("quit_ryzom", NULL);
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId("ui:interface:web_on_quit");
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId("ui:interface:web_on_quit");
|
||||||
pIE->setActive(false);
|
pIE->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
string container = getParam (sParams, "name");
|
string container = getParam (sParams, "name");
|
||||||
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(container));
|
CGroupHTML *groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(container));
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
groupHtml->browse(groupHtml->Home.c_str());
|
groupHtml->browse(groupHtml->Home.c_str());
|
||||||
|
@ -199,7 +199,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
||||||
if(_CheckMailNode)
|
if(_CheckMailNode)
|
||||||
{
|
{
|
||||||
_CheckMailNode->setValue32(nbmail==0?0:1);
|
_CheckMailNode->setValue32(nbmail==0?0:1);
|
||||||
CInterfaceElement *elm = pIM->getElementFromId("ui:interface:compass:mail:mail_nb");
|
CInterfaceElement *elm = CWidgetManager::getInstance()->getElementFromId("ui:interface:compass:mail:mail_nb");
|
||||||
if (elm)
|
if (elm)
|
||||||
{
|
{
|
||||||
CViewText *vt = dynamic_cast<CViewText*>(elm);
|
CViewText *vt = dynamic_cast<CViewText*>(elm);
|
||||||
|
@ -226,7 +226,7 @@ struct CWebigNotificationThread : public NLMISC::IRunnable
|
||||||
if(_CheckForumNode)
|
if(_CheckForumNode)
|
||||||
{
|
{
|
||||||
_CheckForumNode->setValue32(nbforum==0?0:1);
|
_CheckForumNode->setValue32(nbforum==0?0:1);
|
||||||
CInterfaceElement *elm = pIM->getElementFromId("ui:interface:compass:forum:forum_nb");
|
CInterfaceElement *elm = CWidgetManager::getInstance()->getElementFromId("ui:interface:compass:forum:forum_nb");
|
||||||
if (elm)
|
if (elm)
|
||||||
{
|
{
|
||||||
CViewText *vt = dynamic_cast<CViewText*>(elm);
|
CViewText *vt = dynamic_cast<CViewText*>(elm);
|
||||||
|
|
|
@ -61,7 +61,7 @@ void contextHelp (const std::string &name)
|
||||||
string target = pIM->getDefine(defineTarget);
|
string target = pIM->getDefine(defineTarget);
|
||||||
string url = pIM->getDefine(defineUrl);
|
string url = pIM->getDefine(defineUrl);
|
||||||
|
|
||||||
CInterfaceElement *elementTarget = pIM->getElementFromId(target);
|
CInterfaceElement *elementTarget = CWidgetManager::getInstance()->getElementFromId(target);
|
||||||
if (elementTarget && elementTarget->getActive())
|
if (elementTarget && elementTarget->getActive())
|
||||||
{
|
{
|
||||||
// Add the context help
|
// Add the context help
|
||||||
|
@ -165,7 +165,7 @@ void CGroupInSceneBubbleManager::alignMessagePopup (vector<CPopup> &rList, bool
|
||||||
// First message must be aligned from the screen
|
// First message must be aligned from the screen
|
||||||
if (!rList.empty())
|
if (!rList.empty())
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
{
|
{
|
||||||
sint i = (sint)rList.size ()-1;
|
sint i = (sint)rList.size ()-1;
|
||||||
|
@ -234,7 +234,7 @@ void CGroupInSceneBubbleManager::init ()
|
||||||
{
|
{
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -359,7 +359,7 @@ void CGroupInSceneBubbleManager::update ()
|
||||||
if (!_BubblePopup[i].Target.empty())
|
if (!_BubblePopup[i].Target.empty())
|
||||||
{
|
{
|
||||||
// Get the target
|
// Get the target
|
||||||
CInterfaceElement *target = pIM->getElementFromId(_BubblePopup[i].Target);
|
CInterfaceElement *target = CWidgetManager::getInstance()->getElementFromId(_BubblePopup[i].Target);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
// Target is good ?
|
// Target is good ?
|
||||||
|
@ -539,7 +539,7 @@ void CGroupInSceneBubbleManager::addSkillPopup (uint skillId, sint delta, uint t
|
||||||
|
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -588,7 +588,7 @@ void CGroupInSceneBubbleManager::addMessagePopup (const ucstring &message, CRGBA
|
||||||
|
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -637,7 +637,7 @@ void CGroupInSceneBubbleManager::addMessagePopupCenter (const ucstring &message,
|
||||||
|
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -663,7 +663,7 @@ CGroupInSceneBubbleManager::CPopupContext *CGroupInSceneBubbleManager::buildCont
|
||||||
|
|
||||||
string v="m";
|
string v="m";
|
||||||
string h="m";
|
string h="m";
|
||||||
target = CInterfaceManager::getInstance()->getElementFromId(targetName);
|
target = CWidgetManager::getInstance()->getElementFromId(targetName);
|
||||||
if (target)
|
if (target)
|
||||||
{
|
{
|
||||||
// Find a position
|
// Find a position
|
||||||
|
@ -711,7 +711,7 @@ CGroupInSceneBubbleManager::CPopupContext *CGroupInSceneBubbleManager::buildCont
|
||||||
|
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -904,7 +904,7 @@ void CGroupInSceneBubbleManager::dynChatOpen (uint32 nBotUID, uint32 nBotName, c
|
||||||
}
|
}
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -1017,7 +1017,7 @@ void CGroupInSceneBubbleManager::webIgChatOpen (uint32 nBotUID, string text, con
|
||||||
}
|
}
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
@ -1468,7 +1468,7 @@ void CGroupInSceneBubble::setRawText (const ucstring &text)
|
||||||
{
|
{
|
||||||
_CanBeShown = !text.empty();
|
_CanBeShown = !text.empty();
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pVTIE = pIM->getElementFromId(getId()+":header_opened:window:text");
|
CInterfaceElement *pVTIE = CWidgetManager::getInstance()->getElementFromId(getId()+":header_opened:window:text");
|
||||||
CViewText *pVT= dynamic_cast<CViewText*>(pVTIE);
|
CViewText *pVT= dynamic_cast<CViewText*>(pVTIE);
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(text);
|
pVT->setText(text);
|
||||||
|
@ -1479,11 +1479,11 @@ void CGroupInSceneBubble::setRawText (const ucstring &text)
|
||||||
void CGroupInSceneBubble::displayNextAndSkip(bool show)
|
void CGroupInSceneBubble::displayNextAndSkip(bool show)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(getId()+":header_opened:window:but_next");
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(getId()+":header_opened:window:but_next");
|
||||||
if (pIE != NULL) pIE->setActive(show);
|
if (pIE != NULL) pIE->setActive(show);
|
||||||
pIE = pIM->getElementFromId(getId()+":header_opened:window:but_skip");
|
pIE = CWidgetManager::getInstance()->getElementFromId(getId()+":header_opened:window:but_skip");
|
||||||
if (pIE != NULL) pIE->setActive(show);
|
if (pIE != NULL) pIE->setActive(show);
|
||||||
pIE = pIM->getElementFromId(getId()+":header_opened:window:text");
|
pIE = CWidgetManager::getInstance()->getElementFromId(getId()+":header_opened:window:text");
|
||||||
if (pIE != NULL)
|
if (pIE != NULL)
|
||||||
{
|
{
|
||||||
if (show)
|
if (show)
|
||||||
|
|
|
@ -742,7 +742,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
|
||||||
|
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", info);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", info);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
info->setParent(pRoot);
|
info->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (info);
|
pRoot->addGroup (info);
|
||||||
|
@ -1156,7 +1156,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::newGroupInScene(const std::string
|
||||||
{
|
{
|
||||||
// NB : only use the fast version during edition because duplication of CCDBCtrlSheet not implemented now, but we don't
|
// NB : only use the fast version during edition because duplication of CCDBCtrlSheet not implemented now, but we don't
|
||||||
// use it for the edition !!!!
|
// use it for the edition !!!!
|
||||||
CInterfaceElement *prototype = im->getElementFromId("ui:interface:" + templateName + "_proto");
|
CInterfaceElement *prototype = CWidgetManager::getInstance()->getElementFromId("ui:interface:" + templateName + "_proto");
|
||||||
if (prototype && dynamic_cast<CInterfaceGroup *>(prototype))
|
if (prototype && dynamic_cast<CInterfaceGroup *>(prototype))
|
||||||
{
|
{
|
||||||
extern bool NoOpForCCtrlSheetInfo_Serial; // CCDBCtrlSheet::serial not implemented, but prevent an assert in its serial because
|
extern bool NoOpForCCtrlSheetInfo_Serial; // CCDBCtrlSheet::serial not implemented, but prevent an assert in its serial because
|
||||||
|
|
|
@ -573,10 +573,10 @@ void CGroupList::draw ()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
|
|
||||||
if (pIM->getModalWindow() == NULL)
|
if (CWidgetManager::getInstance()->getModalWindow() == NULL)
|
||||||
{
|
{
|
||||||
sint32 x = pIM->getPointer()->getX();
|
sint32 x = CWidgetManager::getInstance()->getPointer()->getX();
|
||||||
sint32 y = pIM->getPointer()->getY();
|
sint32 y = CWidgetManager::getInstance()->getPointer()->getY();
|
||||||
|
|
||||||
CInterfaceGroup *pIG = pIM->getWindowUnder(x, y);
|
CInterfaceGroup *pIG = pIM->getWindowUnder(x, y);
|
||||||
CInterfaceGroup *pParent = this;
|
CInterfaceGroup *pParent = this;
|
||||||
|
|
|
@ -98,13 +98,13 @@ static void popupLandMarkNameDialog()
|
||||||
{
|
{
|
||||||
// pop the rename dialog
|
// pop the rename dialog
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_LANDMARK_NAME));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_LANDMARK_NAME));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
|
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
gc->updateCoords();
|
gc->updateCoords();
|
||||||
gc->center();
|
gc->center();
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->enableBlink(1);
|
gc->enableBlink(1);
|
||||||
|
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
||||||
|
@ -133,7 +133,7 @@ static void popupLandMarkNameDialog()
|
||||||
static void closeLandMarkNameDialog()
|
static void closeLandMarkNameDialog()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(WIN_LANDMARK_NAME));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(WIN_LANDMARK_NAME));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
gc->setActive(false);
|
gc->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -721,7 +721,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
||||||
_RespawnSelectedBitmap->setPosRef(Hotspot_MM);
|
_RespawnSelectedBitmap->setPosRef(Hotspot_MM);
|
||||||
addView(_RespawnSelectedBitmap);
|
addView(_RespawnSelectedBitmap);
|
||||||
|
|
||||||
//CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CInterfaceManager::getInstance()->getElementFromId(_RespawnButton));
|
//CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(_RespawnButton));
|
||||||
//if (pCB != NULL) pCB->setActive(false);
|
//if (pCB != NULL) pCB->setActive(false);
|
||||||
}
|
}
|
||||||
nlassert(!_FrustumView);
|
nlassert(!_FrustumView);
|
||||||
|
@ -1578,13 +1578,13 @@ void CGroupMap::draw()
|
||||||
_FrustumView->setQuad(fruQuad);
|
_FrustumView->setQuad(fruQuad);
|
||||||
_FrustumView->updateCoords();
|
_FrustumView->updateCoords();
|
||||||
// handle mouse over
|
// handle mouse over
|
||||||
if (im->getPointer())
|
if (CWidgetManager::getInstance()->getPointer())
|
||||||
{
|
{
|
||||||
sint32 originX, originY;
|
sint32 originX, originY;
|
||||||
getCorner(originX, originY, getPosRef());
|
getCorner(originX, originY, getPosRef());
|
||||||
CVector delta((float) originX, (float) originY, 0.f);
|
CVector delta((float) originX, (float) originY, 0.f);
|
||||||
fruTri = CTriangle(fruQuad.V0, fruQuad.V1, fruQuad.V2);
|
fruTri = CTriangle(fruQuad.V0, fruQuad.V1, fruQuad.V2);
|
||||||
CVector mousePos((float) im->getPointer()->getXReal(), (float) im->getPointer()->getYReal(), 0.f);
|
CVector mousePos((float) CWidgetManager::getInstance()->getPointer()->getXReal(), (float) CWidgetManager::getInstance()->getPointer()->getYReal(), 0.f);
|
||||||
mousePos -= delta;
|
mousePos -= delta;
|
||||||
CVector dummyHit;
|
CVector dummyHit;
|
||||||
float deltaBlend = DT / (0.001f * (float) _FrustumViewBlendTimeInMs);
|
float deltaBlend = DT / (0.001f * (float) _FrustumViewBlendTimeInMs);
|
||||||
|
@ -2396,13 +2396,13 @@ static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv()
|
||||||
bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG());
|
bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG());
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CInterfaceElement *ie = im->getElementFromId("ui:interface:map_menu:teleport");
|
CInterfaceElement *ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:map_menu:teleport");
|
||||||
if(ie) ie->setActive(showTeleport);
|
if(ie) ie->setActive(showTeleport);
|
||||||
|
|
||||||
ie = im->getElementFromId("ui:interface:land_mark_menu:lmteleport");
|
ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:land_mark_menu:lmteleport");
|
||||||
if(ie) ie->setActive(showTeleport);
|
if(ie) ie->setActive(showTeleport);
|
||||||
|
|
||||||
ie = im->getElementFromId("ui:interface:user_land_mark_menu:lmteleport");
|
ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:user_land_mark_menu:lmteleport");
|
||||||
if(ie) ie->setActive(showTeleport);
|
if(ie) ie->setActive(showTeleport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2878,7 +2878,7 @@ void CGroupMap::targetLandmark(CCtrlButton *lm)
|
||||||
{
|
{
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:OUTPOST:SQUAD_RESPAWN_PT")->setValue32(_RespawnSelected);
|
||||||
// Close window containing the map
|
// Close window containing the map
|
||||||
CInterfaceGroup *pGrp = pIM->getWindow(this);
|
CInterfaceGroup *pGrp = CWidgetManager::getInstance()->getWindow(this);
|
||||||
if (pGrp != NULL) pGrp->setActive(false);
|
if (pGrp != NULL) pGrp->setActive(false);
|
||||||
}
|
}
|
||||||
invalidateCoords();
|
invalidateCoords();
|
||||||
|
@ -2936,13 +2936,13 @@ void CGroupMap::targetLandmark(CCtrlButton *lm)
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(im->getElementFromId(_CompassId));
|
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId(_CompassId));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
gc->setTarget(ct);
|
gc->setTarget(ct);
|
||||||
gc->blink();
|
gc->blink();
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3197,7 +3197,7 @@ class CAHValidateUserLandMarkName : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(im->getElementFromId(WIN_LANDMARK_NAME));
|
CInterfaceGroup *ig = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(WIN_LANDMARK_NAME));
|
||||||
if (!ig) return;
|
if (!ig) return;
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(ig->getGroup("eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(ig->getGroup("eb"));
|
||||||
if (!eb) return;
|
if (!eb) return;
|
||||||
|
@ -3241,7 +3241,7 @@ void createUserLandMark(CCtrlBase * /* pCaller */, const string &/* params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
// pop the rename dialog
|
// pop the rename dialog
|
||||||
LastClickedMap = dynamic_cast<CGroupMap *>(im->getCtrlLaunchingModal());
|
LastClickedMap = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (LastClickedMap->isInDeathMode()) return;
|
if (LastClickedMap->isInDeathMode()) return;
|
||||||
if (LastClickedMap->getNumUserLandMarks() >= CContinent::getMaxNbUserLandMarks() )
|
if (LastClickedMap->getNumUserLandMarks() >= CContinent::getMaxNbUserLandMarks() )
|
||||||
{
|
{
|
||||||
|
@ -3284,7 +3284,7 @@ class CAHMapZoomIn : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string map = getParam(params, "map");
|
std::string map = getParam(params, "map");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (!gm) return;
|
if (!gm) return;
|
||||||
NLMISC::CVector2f center;
|
NLMISC::CVector2f center;
|
||||||
gm->windowToMap(center, gm->getWReal() / 2, gm->getHReal() / 2);
|
gm->windowToMap(center, gm->getWReal() / 2, gm->getHReal() / 2);
|
||||||
|
@ -3301,7 +3301,7 @@ class CAHMapZoomOut : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string map = getParam(params, "map");
|
std::string map = getParam(params, "map");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (!gm) return;
|
if (!gm) return;
|
||||||
NLMISC::CVector2f center;
|
NLMISC::CVector2f center;
|
||||||
gm->windowToMap(center, gm->getWReal() / 2, gm->getHReal() / 2);
|
gm->windowToMap(center, gm->getWReal() / 2, gm->getHReal() / 2);
|
||||||
|
@ -3318,7 +3318,7 @@ class CAHMapCenter : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string map = getParam(params, "map");
|
std::string map = getParam(params, "map");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (!gm) return;
|
if (!gm) return;
|
||||||
gm->centerOnPlayer();
|
gm->centerOnPlayer();
|
||||||
}
|
}
|
||||||
|
@ -3333,7 +3333,7 @@ class CAHMapBack : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string map = getParam(params, "map");
|
std::string map = getParam(params, "map");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pGM = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *pGM = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (pGM == NULL) return;
|
if (pGM == NULL) return;
|
||||||
SMap *pMap = pGM->getParentMap(pGM->getCurMap());
|
SMap *pMap = pGM->getParentMap(pGM->getCurMap());
|
||||||
if (pMap != NULL)
|
if (pMap != NULL)
|
||||||
|
@ -3350,7 +3350,7 @@ class CAHRespawnMapValid : public IActionHandler
|
||||||
{
|
{
|
||||||
std::string map = getParam(params, "map");
|
std::string map = getParam(params, "map");
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (!gm) return;
|
if (!gm) return;
|
||||||
if (gm->getRespawnSelected() == -1) return;
|
if (gm->getRespawnSelected() == -1) return;
|
||||||
|
|
||||||
|
@ -3406,7 +3406,7 @@ class CAHWorldMapRightClick : public IActionHandler
|
||||||
|
|
||||||
hideTeleportButtonsInPopupMenuIfNotEnoughPriv();
|
hideTeleportButtonsInPopupMenuIfNotEnoughPriv();
|
||||||
|
|
||||||
CGroupMap *gm = dynamic_cast<CGroupMap *>(im->getElementFromId(map));
|
CGroupMap *gm = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId(map));
|
||||||
if (!gm) return;
|
if (!gm) return;
|
||||||
if (!gm->isIsland())
|
if (!gm->isIsland())
|
||||||
{
|
{
|
||||||
|
@ -3457,7 +3457,7 @@ class CAHMapTeleport : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMap *clickedMap = dynamic_cast<CGroupMap *>(im->getCtrlLaunchingModal());
|
CGroupMap *clickedMap = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
closeLandMarkNameDialog();
|
closeLandMarkNameDialog();
|
||||||
NLMISC::CVector2f pos = clickedMap->getRightClickLastPos();
|
NLMISC::CVector2f pos = clickedMap->getRightClickLastPos();
|
||||||
clickedMap->mapToWorld(pos, pos);
|
clickedMap->mapToWorld(pos, pos);
|
||||||
|
@ -3512,7 +3512,7 @@ class CUpdateLandMarksColor : public IActionHandler{public: virtual void execute
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CGroupMap *pGM = dynamic_cast<CGroupMap *>(pIM->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
CGroupMap *pGM = dynamic_cast<CGroupMap *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (pGM == NULL) return;
|
if (pGM == NULL) return;
|
||||||
pGM->updateUserLandMarks();
|
pGM->updateUserLandMarks();
|
||||||
|
|
||||||
|
@ -3555,7 +3555,7 @@ NLMISC_COMMAND( testRespawn, "Debug : test respawn map", "" )
|
||||||
rpm.RespawnPoints.push_back(CRespawnPointsMsg::SRespawnPoint(4050*1000,-4200*1000));
|
rpm.RespawnPoints.push_back(CRespawnPointsMsg::SRespawnPoint(4050*1000,-4200*1000));
|
||||||
rpm.RespawnPoints.push_back(CRespawnPointsMsg::SRespawnPoint(4200*1000,-4150*1000));
|
rpm.RespawnPoints.push_back(CRespawnPointsMsg::SRespawnPoint(4200*1000,-4150*1000));
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("problem cannot find ui:interface:respawn_map:content:map_content:actual_map");
|
nlwarning("problem cannot find ui:interface:respawn_map:content:map_content:actual_map");
|
||||||
|
@ -3564,7 +3564,7 @@ NLMISC_COMMAND( testRespawn, "Debug : test respawn map", "" )
|
||||||
pMap->addRespawnPoints(rpm);
|
pMap->addRespawnPoints(rpm);
|
||||||
|
|
||||||
|
|
||||||
pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("problem cannot find ui:interface:map:content:map_content:actual_map");
|
nlwarning("problem cannot find ui:interface:map:content:map_content:actual_map");
|
||||||
|
@ -3584,7 +3584,7 @@ NLMISC_COMMAND( setMap, "Debug : test respawn map", "" )
|
||||||
if (args.size() != 1) return false;
|
if (args.size() != 1) return false;
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (pMap != NULL)
|
if (pMap != NULL)
|
||||||
pMap->setMap(args[0]);
|
pMap->setMap(args[0]);
|
||||||
|
|
||||||
|
|
|
@ -867,8 +867,8 @@ void CGroupSubMenu::checkCoords()
|
||||||
|
|
||||||
// if the mouse goes out the window, unselect all (because handleEvent may not be called)
|
// if the mouse goes out the window, unselect all (because handleEvent may not be called)
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
sint xMouse= pIM->getPointer()->getX();
|
sint xMouse= CWidgetManager::getInstance()->getPointer()->getX();
|
||||||
sint yMouse= pIM->getPointer()->getY();
|
sint yMouse= CWidgetManager::getInstance()->getPointer()->getY();
|
||||||
if (!((xMouse >= _XReal) &&
|
if (!((xMouse >= _XReal) &&
|
||||||
(xMouse < (_XReal + _WReal))&&
|
(xMouse < (_XReal + _WReal))&&
|
||||||
(yMouse > _YReal) &&
|
(yMouse > _YReal) &&
|
||||||
|
@ -984,7 +984,7 @@ bool CGroupSubMenu::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
pIM->runActionHandler ( _Lines[_Selected].AHName,
|
pIM->runActionHandler ( _Lines[_Selected].AHName,
|
||||||
pIM->getCtrlLaunchingModal(),
|
CWidgetManager::getInstance()->getCtrlLaunchingModal(),
|
||||||
_Lines[_Selected].AHParams );
|
_Lines[_Selected].AHParams );
|
||||||
|
|
||||||
if (_SubMenus[_Selected] != NULL)
|
if (_SubMenus[_Selected] != NULL)
|
||||||
|
@ -994,12 +994,12 @@ bool CGroupSubMenu::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if the menu hasn't triggered a new modal window, disable it
|
// if the menu hasn't triggered a new modal window, disable it
|
||||||
if (pIM->getModalWindow() == _GroupMenu)
|
if (CWidgetManager::getInstance()->getModalWindow() == _GroupMenu)
|
||||||
{
|
{
|
||||||
if(_GroupMenu && _GroupMenu->getCloseSubMenuUsingPopModal())
|
if(_GroupMenu && _GroupMenu->getCloseSubMenuUsingPopModal())
|
||||||
pIM->popModalWindow();
|
CWidgetManager::getInstance()->popModalWindow();
|
||||||
else
|
else
|
||||||
pIM->disableModalWindow ();
|
CWidgetManager::getInstance()->disableModalWindow ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1936,10 +1936,10 @@ bool CGroupMenu::parse (xmlNodePtr in, CInterfaceGroup *parentGroup)
|
||||||
if (prop)
|
if (prop)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupMenu *gm = dynamic_cast<CGroupMenu *>(im->getElementFromId(prop));
|
CGroupMenu *gm = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(prop));
|
||||||
if (!gm)
|
if (!gm)
|
||||||
{
|
{
|
||||||
gm = dynamic_cast<CGroupMenu *>(im->getElementFromId("ui:interface:" + std::string((const char*)prop)));
|
gm = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:" + std::string((const char*)prop)));
|
||||||
}
|
}
|
||||||
if (gm)
|
if (gm)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,11 +57,11 @@ void CGroupModalGetKey::setActive (bool state)
|
||||||
else
|
else
|
||||||
pIM->setCaptureKeyboard (NULL);
|
pIM->setCaptureKeyboard (NULL);
|
||||||
|
|
||||||
CViewText *pVT= dynamic_cast<CViewText*>(pIM->getElementFromId( VIEW_TEXT_KEY ));
|
CViewText *pVT= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId( VIEW_TEXT_KEY ));
|
||||||
if (pVT != NULL) pVT->setText(string(""));
|
if (pVT != NULL) pVT->setText(string(""));
|
||||||
pVT= dynamic_cast<CViewText*>(pIM->getElementFromId( VIEW_TEXT_INUSE ));
|
pVT= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId( VIEW_TEXT_INUSE ));
|
||||||
if (pVT != NULL) pVT->setText(string(""));
|
if (pVT != NULL) pVT->setText(string(""));
|
||||||
CCtrlBaseButton *pCB= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( CTRL_BUTTON_OK ));
|
CCtrlBaseButton *pCB= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( CTRL_BUTTON_OK ));
|
||||||
if (pCB != NULL) pCB->setFrozen(true);
|
if (pCB != NULL) pCB->setFrozen(true);
|
||||||
|
|
||||||
CGroupModal::setActive(state);
|
CGroupModal::setActive(state);
|
||||||
|
@ -85,7 +85,7 @@ bool CGroupModalGetKey::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
|
|
||||||
// Setup the text !
|
// Setup the text !
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT= dynamic_cast<CViewText*>(pIM->getElementFromId( VIEW_TEXT_KEY ));
|
CViewText *pVT= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId( VIEW_TEXT_KEY ));
|
||||||
if (pVT != NULL) pVT->setText(Combo.toUCString());
|
if (pVT != NULL) pVT->setText(Combo.toUCString());
|
||||||
|
|
||||||
// Check if in use
|
// Check if in use
|
||||||
|
@ -101,7 +101,7 @@ bool CGroupModalGetKey::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
{
|
{
|
||||||
const CActionsManager::TComboActionMap &keyShortcut = pCurAM->getComboActionMap();
|
const CActionsManager::TComboActionMap &keyShortcut = pCurAM->getComboActionMap();
|
||||||
CActionsManager::TComboActionMap::const_iterator it = keyShortcut.find(Combo);
|
CActionsManager::TComboActionMap::const_iterator it = keyShortcut.find(Combo);
|
||||||
pVT = dynamic_cast<CViewText*>(pIM->getElementFromId( VIEW_TEXT_INUSE ));
|
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId( VIEW_TEXT_INUSE ));
|
||||||
if (it != keyShortcut.end())
|
if (it != keyShortcut.end())
|
||||||
{
|
{
|
||||||
const CBaseAction *baseAction = pCurAM->getBaseAction(it->second);
|
const CBaseAction *baseAction = pCurAM->getBaseAction(it->second);
|
||||||
|
@ -118,7 +118,7 @@ bool CGroupModalGetKey::handleEvent (const NLGUI::CEventDescriptor &event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the ok button
|
// Show the ok button
|
||||||
CCtrlBaseButton *pCB= dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId( CTRL_BUTTON_OK ));
|
CCtrlBaseButton *pCB= dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId( CTRL_BUTTON_OK ));
|
||||||
if (pCB != NULL) pCB->setFrozen(false);
|
if (pCB != NULL) pCB->setFrozen(false);
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -773,10 +773,10 @@ void CGroupParagraph::draw ()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
|
|
||||||
if (pIM->getModalWindow() == NULL)
|
if (CWidgetManager::getInstance()->getModalWindow() == NULL)
|
||||||
{
|
{
|
||||||
sint32 x = pIM->getPointer()->getX();
|
sint32 x = CWidgetManager::getInstance()->getPointer()->getX();
|
||||||
sint32 y = pIM->getPointer()->getY();
|
sint32 y = CWidgetManager::getInstance()->getPointer()->getY();
|
||||||
|
|
||||||
CInterfaceGroup *pIG = pIM->getWindowUnder(x,y);
|
CInterfaceGroup *pIG = pIM->getWindowUnder(x,y);
|
||||||
CInterfaceGroup *pParent = this;
|
CInterfaceGroup *pParent = this;
|
||||||
|
|
|
@ -153,7 +153,7 @@ void CGroupPhraseSkillFilter::rebuild()
|
||||||
// get the tree
|
// get the tree
|
||||||
if (_Tree == NULL)
|
if (_Tree == NULL)
|
||||||
{
|
{
|
||||||
_Tree = dynamic_cast<CGroupTree*>(pIM->getElementFromId(getId(),"sbtree:tree_list"));
|
_Tree = dynamic_cast<CGroupTree*>(CWidgetManager::getInstance()->getElementFromId(getId(),"sbtree:tree_list"));
|
||||||
|
|
||||||
if (_Tree == NULL)
|
if (_Tree == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -359,7 +359,7 @@ class CHandlerSubmitQuickHelp : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||||
{
|
{
|
||||||
CInterfaceElement *element = CInterfaceManager::getInstance()->getElementFromId("ui:interface:quick_help:content:html");
|
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId("ui:interface:quick_help:content:html");
|
||||||
if (element)
|
if (element)
|
||||||
{
|
{
|
||||||
// Group HTML ?
|
// Group HTML ?
|
||||||
|
@ -370,7 +370,7 @@ class CHandlerSubmitQuickHelp : public IActionHandler
|
||||||
groupQH->submitEvent (sParams.c_str());
|
groupQH->submitEvent (sParams.c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
element = CInterfaceManager::getInstance()->getElementFromId("ui:interface:help_browser:content:html");
|
element = CWidgetManager::getInstance()->getElementFromId("ui:interface:help_browser:content:html");
|
||||||
if (element)
|
if (element)
|
||||||
{
|
{
|
||||||
// Group HTML ?
|
// Group HTML ?
|
||||||
|
@ -400,7 +400,7 @@ class CHandlerRunQuickHelp : public IActionHandler
|
||||||
if (!buttonId.empty())
|
if (!buttonId.empty())
|
||||||
{
|
{
|
||||||
// Get the button id
|
// Get the button id
|
||||||
CInterfaceElement *element = pIM->getElementFromId(buttonId+":"+sParams);
|
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId(buttonId+":"+sParams);
|
||||||
if (element)
|
if (element)
|
||||||
{
|
{
|
||||||
// Button Ctrl ?
|
// Button Ctrl ?
|
||||||
|
|
|
@ -124,7 +124,7 @@ void CGroupSkills::rebuild()
|
||||||
// **** first time bind?
|
// **** first time bind?
|
||||||
if(!_Tree)
|
if(!_Tree)
|
||||||
{
|
{
|
||||||
_Tree = dynamic_cast<CGroupTree*>(pIM->getElementFromId(getId(),WIN_TREE_LIST));
|
_Tree = dynamic_cast<CGroupTree*>(CWidgetManager::getInstance()->getElementFromId(getId(),WIN_TREE_LIST));
|
||||||
if (_Tree == NULL)
|
if (_Tree == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("cant find tree");
|
nlwarning("cant find tree");
|
||||||
|
|
|
@ -571,10 +571,10 @@ void CGroupTree::draw()
|
||||||
bDisplayOver = false;
|
bDisplayOver = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (pIM->getModalWindow() == NULL)
|
if (CWidgetManager::getInstance()->getModalWindow() == NULL)
|
||||||
{
|
{
|
||||||
sint32 x = pIM->getPointer()->getX();
|
sint32 x = CWidgetManager::getInstance()->getPointer()->getX();
|
||||||
sint32 y = pIM->getPointer()->getY();
|
sint32 y = CWidgetManager::getInstance()->getPointer()->getY();
|
||||||
|
|
||||||
CInterfaceGroup *pIG = pIM->getWindowUnder(x, y);
|
CInterfaceGroup *pIG = pIM->getWindowUnder(x, y);
|
||||||
CInterfaceGroup *pParent = this;
|
CInterfaceGroup *pParent = this;
|
||||||
|
@ -1331,7 +1331,7 @@ public:
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupTree *pTree = dynamic_cast<CGroupTree*>(pIM->getElementFromId(sParams));
|
CGroupTree *pTree = dynamic_cast<CGroupTree*>(CWidgetManager::getInstance()->getElementFromId(sParams));
|
||||||
if (pTree != NULL)
|
if (pTree != NULL)
|
||||||
pTree->reset();
|
pTree->reset();
|
||||||
}
|
}
|
||||||
|
|
|
@ -325,12 +325,12 @@ void CGuildManager::update()
|
||||||
// Open the guild info if we are not in the init phase
|
// Open the guild info if we are not in the init phase
|
||||||
if (!IngameDbMngr.initInProgress())
|
if (!IngameDbMngr.initInProgress())
|
||||||
{
|
{
|
||||||
pElt = pIM->getElementFromId(WIN_GUILD);
|
pElt = CWidgetManager::getInstance()->getElementFromId(WIN_GUILD);
|
||||||
if (pElt != NULL)
|
if (pElt != NULL)
|
||||||
pElt->setActive(true);
|
pElt->setActive(true);
|
||||||
}
|
}
|
||||||
// Browse the forum
|
// Browse the forum
|
||||||
pElt = pIM->getElementFromId(WIN_GUILD_FORUM":content:html");
|
pElt = CWidgetManager::getInstance()->getElementFromId(WIN_GUILD_FORUM":content:html");
|
||||||
if (pElt != NULL)
|
if (pElt != NULL)
|
||||||
{
|
{
|
||||||
CGroupHTML *html = dynamic_cast<CGroupHTML*>(pElt);
|
CGroupHTML *html = dynamic_cast<CGroupHTML*>(pElt);
|
||||||
|
@ -423,17 +423,17 @@ void CGuildManager::update()
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:GUILD_GRADE")->setValue32(_Grade);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:USER:GUILD_GRADE")->setValue32(_Grade);
|
||||||
|
|
||||||
// update the guild display
|
// update the guild display
|
||||||
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD));
|
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_GUILD));
|
||||||
if (pGuild != NULL)
|
if (pGuild != NULL)
|
||||||
{
|
{
|
||||||
// if the guild window is visible
|
// if the guild window is visible
|
||||||
if (pGuild->isOpen() && pGuild->getActive())
|
if (pGuild->isOpen() && pGuild->getActive())
|
||||||
{
|
{
|
||||||
// Close the modal window if the member list will change
|
// Close the modal window if the member list will change
|
||||||
if(pIM->getModalWindow()!=NULL && _NeedUpdateMembers)
|
if(CWidgetManager::getInstance()->getModalWindow()!=NULL && _NeedUpdateMembers)
|
||||||
{
|
{
|
||||||
if (pIM->getModalWindow()->getId() == MENU_GUILD_MEMBER )
|
if (CWidgetManager::getInstance()->getModalWindow()->getId() == MENU_GUILD_MEMBER )
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rebuild interface. Rebuild members only if needed
|
// Rebuild interface. Rebuild members only if needed
|
||||||
|
@ -456,15 +456,15 @@ void CGuildManager::update()
|
||||||
if (bAllValid)
|
if (bAllValid)
|
||||||
{
|
{
|
||||||
_JoinPropUpdate = false;
|
_JoinPropUpdate = false;
|
||||||
CGroupContainer *pJoinProp = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_JOIN_PROPOSAL));
|
CGroupContainer *pJoinProp = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_JOIN_PROPOSAL));
|
||||||
if (pJoinProp != NULL)
|
if (pJoinProp != NULL)
|
||||||
{
|
{
|
||||||
CViewText *pJoinPropPhraseView = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_JOIN_PROPOSAL_PHRASE));
|
CViewText *pJoinPropPhraseView = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_JOIN_PROPOSAL_PHRASE));
|
||||||
if (pJoinPropPhraseView != NULL)
|
if (pJoinPropPhraseView != NULL)
|
||||||
pJoinPropPhraseView->setText(_JoinPropPhrase);
|
pJoinPropPhraseView->setText(_JoinPropPhrase);
|
||||||
|
|
||||||
pJoinProp->setActive(true);
|
pJoinProp->setActive(true);
|
||||||
pIM->setTopWindow(pJoinProp);
|
CWidgetManager::getInstance()->setTopWindow(pJoinProp);
|
||||||
pJoinProp->updateCoords();
|
pJoinProp->updateCoords();
|
||||||
pJoinProp->center();
|
pJoinProp->center();
|
||||||
pJoinProp->enableBlink(2);
|
pJoinProp->enableBlink(2);
|
||||||
|
@ -498,10 +498,10 @@ void CGuildManager::launchAscensor()
|
||||||
|
|
||||||
// Start Ascensor Interface
|
// Start Ascensor Interface
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pAC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_ASCENSOR));
|
CGroupContainer *pAC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_ASCENSOR));
|
||||||
if (pAC == NULL) return;
|
if (pAC == NULL) return;
|
||||||
pAC->setActive(true);
|
pAC->setActive(true);
|
||||||
pIM->setTopWindow(pAC);
|
CWidgetManager::getInstance()->setTopWindow(pAC);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMP TEMP TEMP
|
// TEMP TEMP TEMP
|
||||||
|
@ -550,7 +550,7 @@ NLMISC_COMMAND(testAscensorPage, "Temp : Simulate the server that fills the data
|
||||||
void CGuildManager::quitAscensor()
|
void CGuildManager::quitAscensor()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pAC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_ASCENSOR));
|
CGroupContainer *pAC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_ASCENSOR));
|
||||||
if (pAC == NULL) return;
|
if (pAC == NULL) return;
|
||||||
pAC->setActive(false);
|
pAC->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -566,7 +566,7 @@ void CGuildManager::launchJoinProposal(uint32 phraseID)
|
||||||
void CGuildManager::quitJoinProposal()
|
void CGuildManager::quitJoinProposal()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pJoinProp = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_JOIN_PROPOSAL));
|
CGroupContainer *pJoinProp = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_JOIN_PROPOSAL));
|
||||||
if (pJoinProp != NULL)
|
if (pJoinProp != NULL)
|
||||||
pJoinProp->setActive(false);
|
pJoinProp->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -575,13 +575,13 @@ void CGuildManager::quitJoinProposal()
|
||||||
void CGuildManager::closeAllInterfaces()
|
void CGuildManager::closeAllInterfaces()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD));
|
CGroupContainer *pGuild = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_GUILD));
|
||||||
if (pGuild != NULL)
|
if (pGuild != NULL)
|
||||||
pGuild->setActive(false);
|
pGuild->setActive(false);
|
||||||
CGroupContainer *pGuildForum = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD_FORUM));
|
CGroupContainer *pGuildForum = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_GUILD_FORUM));
|
||||||
if (pGuildForum != NULL)
|
if (pGuildForum != NULL)
|
||||||
pGuildForum->setActive(false);
|
pGuildForum->setActive(false);
|
||||||
CGroupContainer *pGuildChat = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_GUILD_CHAT));
|
CGroupContainer *pGuildChat = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_GUILD_CHAT));
|
||||||
if (pGuildChat != NULL)
|
if (pGuildChat != NULL)
|
||||||
pGuildChat->setActive(false);
|
pGuildChat->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -598,13 +598,13 @@ void CGuildManager::openGuildWindow()
|
||||||
// node->setValue64(1);
|
// node->setValue64(1);
|
||||||
//
|
//
|
||||||
// CInterfaceElement *pElt;
|
// CInterfaceElement *pElt;
|
||||||
// pElt = pIM->getElementFromId(WIN_GUILD);
|
// pElt = CWidgetManager::getInstance()->getElementFromId(WIN_GUILD);
|
||||||
// if (pElt != NULL)
|
// if (pElt != NULL)
|
||||||
// {
|
// {
|
||||||
// pElt->setActive(true);
|
// pElt->setActive(true);
|
||||||
// }
|
// }
|
||||||
// // Browse the forum
|
// // Browse the forum
|
||||||
// pElt = pIM->getElementFromId(WIN_GUILD_FORUM":content:html");
|
// pElt = CWidgetManager::getInstance()->getElementFromId(WIN_GUILD_FORUM":content:html");
|
||||||
// if (pElt != NULL)
|
// if (pElt != NULL)
|
||||||
// {
|
// {
|
||||||
// CGroupHTML *html = dynamic_cast<CGroupHTML*>(pElt);
|
// CGroupHTML *html = dynamic_cast<CGroupHTML*>(pElt);
|
||||||
|
@ -785,7 +785,7 @@ class CAHGuildSheetOpen : public IActionHandler
|
||||||
const SGuild &rGuild = pGM->getGuild();
|
const SGuild &rGuild = pGM->getGuild();
|
||||||
|
|
||||||
// Freeze / unfreeze quit button
|
// Freeze / unfreeze quit button
|
||||||
CCtrlBaseButton *control = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(VIEW_TEXT_GUILD_QUIT));
|
CCtrlBaseButton *control = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TEXT_GUILD_QUIT));
|
||||||
if (control)
|
if (control)
|
||||||
control->setFrozen (!rGuild.QuitGuildAvailable || pGM->isProxy());
|
control->setFrozen (!rGuild.QuitGuildAvailable || pGM->isProxy());
|
||||||
|
|
||||||
|
@ -799,12 +799,12 @@ class CAHGuildSheetOpen : public IActionHandler
|
||||||
|
|
||||||
// update member count view
|
// update member count view
|
||||||
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_TEXT_GUILD_MEMBER_COUNT));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TEXT_GUILD_MEMBER_COUNT));
|
||||||
if (pVT)
|
if (pVT)
|
||||||
pVT->setText(toString(rGuildMembers.size()));
|
pVT->setText(toString(rGuildMembers.size()));
|
||||||
|
|
||||||
// rebuild guild member list
|
// rebuild guild member list
|
||||||
CGroupList *pParent = dynamic_cast<CGroupList*>(pIM->getElementFromId(LIST_GUILD_MEMBERS));
|
CGroupList *pParent = dynamic_cast<CGroupList*>(CWidgetManager::getInstance()->getElementFromId(LIST_GUILD_MEMBERS));
|
||||||
if (pParent == NULL) return;
|
if (pParent == NULL) return;
|
||||||
pParent->clearGroups();
|
pParent->clearGroups();
|
||||||
pParent->setDynamicDisplaySize(false);
|
pParent->setDynamicDisplaySize(false);
|
||||||
|
@ -892,19 +892,19 @@ static void setRights(bool lead, bool hioff, bool offi, bool recr, bool bear, bo
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewTextMenu *pVTM;
|
CViewTextMenu *pVTM;
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":lead")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":lead")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!lead);
|
if (pVTM != NULL) pVTM->setGrayed(!lead);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":hiof")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":hiof")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!hioff);
|
if (pVTM != NULL) pVTM->setGrayed(!hioff);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":offi")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":offi")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!offi);
|
if (pVTM != NULL) pVTM->setGrayed(!offi);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":recr")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":recr")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!recr);
|
if (pVTM != NULL) pVTM->setGrayed(!recr);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":bear")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":bear")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!bear);
|
if (pVTM != NULL) pVTM->setGrayed(!bear);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":memb")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":memb")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!memb);
|
if (pVTM != NULL) pVTM->setGrayed(!memb);
|
||||||
pVTM = dynamic_cast<CViewTextMenu*>(pIM->getElementFromId(string(MENU_GUILD_MEMBER":kick")));
|
pVTM = dynamic_cast<CViewTextMenu*>(CWidgetManager::getInstance()->getElementFromId(string(MENU_GUILD_MEMBER":kick")));
|
||||||
if (pVTM != NULL) pVTM->setGrayed(!kick);
|
if (pVTM != NULL) pVTM->setGrayed(!kick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,11 +918,11 @@ class CAHGuildSheetMenuOpen : public IActionHandler
|
||||||
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
||||||
|
|
||||||
// *** Check and retrieve the current member index (index in the member list)
|
// *** Check and retrieve the current member index (index in the member list)
|
||||||
CCtrlBase *ctrlLaunchingModal= pIM->getCtrlLaunchingModal();
|
CCtrlBase *ctrlLaunchingModal= CWidgetManager::getInstance()->getCtrlLaunchingModal();
|
||||||
if (pCaller == NULL || ctrlLaunchingModal == NULL)
|
if (pCaller == NULL || ctrlLaunchingModal == NULL)
|
||||||
{
|
{
|
||||||
// Error -> Close
|
// Error -> Close
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
string sId = ctrlLaunchingModal->getId();
|
string sId = ctrlLaunchingModal->getId();
|
||||||
|
@ -932,7 +932,7 @@ class CAHGuildSheetMenuOpen : public IActionHandler
|
||||||
if ((nLineNb < 0) || (nLineNb >= (sint32)rGuildMembers.size()))
|
if ((nLineNb < 0) || (nLineNb >= (sint32)rGuildMembers.size()))
|
||||||
{
|
{
|
||||||
// Error -> Close
|
// Error -> Close
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MemberIndexSelected= nLineNb;
|
MemberIndexSelected= nLineNb;
|
||||||
|
@ -942,7 +942,7 @@ class CAHGuildSheetMenuOpen : public IActionHandler
|
||||||
if(MemberNameSelected.empty())
|
if(MemberNameSelected.empty())
|
||||||
{
|
{
|
||||||
// Error -> Close
|
// Error -> Close
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1052,7 +1052,7 @@ public:
|
||||||
CGuildManager *pGM = CGuildManager::getInstance();
|
CGuildManager *pGM = CGuildManager::getInstance();
|
||||||
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
const vector<SGuildMember> &rGuildMembers = pGM->getGuildMembers();
|
||||||
// *** Check and retrieve the current member index (index in the member list)
|
// *** Check and retrieve the current member index (index in the member list)
|
||||||
CCtrlBase *ctrlLaunchingModal= pIM->getCtrlLaunchingModal();
|
CCtrlBase *ctrlLaunchingModal= CWidgetManager::getInstance()->getCtrlLaunchingModal();
|
||||||
if (pCaller == NULL)
|
if (pCaller == NULL)
|
||||||
{
|
{
|
||||||
// Error -> Close
|
// Error -> Close
|
||||||
|
@ -1355,7 +1355,7 @@ class CHandlerGuildInvGetMoney : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
sendMoneyServerMessage("GUILD:TAKE_MONEY");
|
sendMoneyServerMessage("GUILD:TAKE_MONEY");
|
||||||
CInterfaceManager::getInstance()->popModalWindow();
|
CWidgetManager::getInstance()->popModalWindow();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER (CHandlerGuildInvGetMoney, "guild_inv_get_money");
|
REGISTER_ACTION_HANDLER (CHandlerGuildInvGetMoney, "guild_inv_get_money");
|
||||||
|
@ -1367,7 +1367,7 @@ class CHandlerGuildInvPutMoney : public IActionHandler
|
||||||
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
sendMoneyServerMessage("GUILD:PUT_MONEY");
|
sendMoneyServerMessage("GUILD:PUT_MONEY");
|
||||||
CInterfaceManager::getInstance()->popModalWindow();
|
CWidgetManager::getInstance()->popModalWindow();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER (CHandlerGuildInvPutMoney, "guild_inv_put_money");
|
REGISTER_ACTION_HANDLER (CHandlerGuildInvPutMoney, "guild_inv_put_money");
|
||||||
|
|
|
@ -258,7 +258,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// **** Event Mouse
|
// **** Event Mouse
|
||||||
else if(pIM->getPointer() && _Focus /* && pIM->isMouseHandlingEnabled() */ &&
|
else if(CWidgetManager::getInstance()->getPointer() && _Focus /* && pIM->isMouseHandlingEnabled() */ &&
|
||||||
( event == EventMouseMoveId ||
|
( event == EventMouseMoveId ||
|
||||||
event == EventMouseDownId ||
|
event == EventMouseDownId ||
|
||||||
event == EventMouseUpId ||
|
event == EventMouseUpId ||
|
||||||
|
@ -268,7 +268,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
CViewPointer &rIP = *pIM->getPointer();
|
CViewPointer &rIP = *CWidgetManager::getInstance()->getPointer();
|
||||||
|
|
||||||
NLGUI::CEventDescriptorMouse eventDesc;
|
NLGUI::CEventDescriptorMouse eventDesc;
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ bool CInterface3DScene::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
_Ref3DScene = NULL;
|
_Ref3DScene = NULL;
|
||||||
if (ptr)
|
if (ptr)
|
||||||
{
|
{
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(this->getId(), ptr);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(this->getId(), ptr);
|
||||||
_Ref3DScene = dynamic_cast<CInterface3DScene*>(pIE);
|
_Ref3DScene = dynamic_cast<CInterface3DScene*>(pIE);
|
||||||
}
|
}
|
||||||
if (_Ref3DScene != NULL)
|
if (_Ref3DScene != NULL)
|
||||||
|
@ -705,7 +705,7 @@ void CInterface3DScene::setCurrentCamera (const string &name)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterface3DScene *pI3DS = (_Ref3DScene != NULL) ? _Ref3DScene : this;
|
CInterface3DScene *pI3DS = (_Ref3DScene != NULL) ? _Ref3DScene : this;
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(pI3DS->getId(), name);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(pI3DS->getId(), name);
|
||||||
CInterface3DCamera *pI3DCam = dynamic_cast<CInterface3DCamera*>(pIE);
|
CInterface3DCamera *pI3DCam = dynamic_cast<CInterface3DCamera*>(pIE);
|
||||||
if (pI3DCam != NULL)
|
if (pI3DCam != NULL)
|
||||||
{
|
{
|
||||||
|
@ -732,7 +732,7 @@ void CInterface3DScene::setCurrentClusterSystem(const string &sCSName)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterface3DScene *pI3DS = (_Ref3DScene != NULL) ? _Ref3DScene : this;
|
CInterface3DScene *pI3DS = (_Ref3DScene != NULL) ? _Ref3DScene : this;
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(pI3DS->getId(), sCSName);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(pI3DS->getId(), sCSName);
|
||||||
CInterface3DIG *pI3DIG = dynamic_cast<CInterface3DIG*>(pIE);
|
CInterface3DIG *pI3DIG = dynamic_cast<CInterface3DIG*>(pIE);
|
||||||
if (pI3DIG != NULL)
|
if (pI3DIG != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -565,7 +565,7 @@ void CInterfaceConfig::CDesktopImage::fromCurrentDesktop()
|
||||||
f.resetPtrTable();
|
f.resetPtrTable();
|
||||||
f.seek(0, NLMISC::IStream::begin);
|
f.seek(0, NLMISC::IStream::begin);
|
||||||
// Save the Top Window for this config.
|
// Save the Top Window for this config.
|
||||||
CInterfaceGroup *topWindow= pIM->getTopWindow(pIM->getLastTopWindowPriority());
|
CInterfaceGroup *topWindow= CWidgetManager::getInstance()->getTopWindow(CWidgetManager::getInstance()->getLastTopWindowPriority());
|
||||||
string topWindowName;
|
string topWindowName;
|
||||||
if (topWindow)
|
if (topWindow)
|
||||||
{
|
{
|
||||||
|
@ -595,7 +595,7 @@ void CInterfaceConfig::CDesktopImage::toCurrentDesktop()
|
||||||
|
|
||||||
for(uint k = 0; k < GCImages.size(); ++k)
|
for(uint k = 0; k < GCImages.size(); ++k)
|
||||||
{
|
{
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(GCImages[k].Id));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(GCImages[k].Id));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
GCImages[k].setTo(pGC);
|
GCImages[k].setTo(pGC);
|
||||||
}
|
}
|
||||||
|
@ -617,9 +617,9 @@ void CInterfaceConfig::CDesktopImage::toCurrentDesktop()
|
||||||
f.serial(topWindowName);
|
f.serial(topWindowName);
|
||||||
if(!topWindowName.empty())
|
if(!topWindowName.empty())
|
||||||
{
|
{
|
||||||
CInterfaceGroup *window= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(topWindowName));
|
CInterfaceGroup *window= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(topWindowName));
|
||||||
if(window && window->getActive())
|
if(window && window->getActive())
|
||||||
pIM->setTopWindow(window);
|
CWidgetManager::getInstance()->setTopWindow(window);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32 numElemWithConfig;
|
uint32 numElemWithConfig;
|
||||||
|
@ -632,7 +632,7 @@ void CInterfaceConfig::CDesktopImage::toCurrentDesktop()
|
||||||
f.serial(chunkSize);
|
f.serial(chunkSize);
|
||||||
uint startPos = f.getPos();
|
uint startPos = f.getPos();
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *elem = im->getElementFromId(elemID);
|
CInterfaceElement *elem = CWidgetManager::getInstance()->getElementFromId(elemID);
|
||||||
if (!elem)
|
if (!elem)
|
||||||
{
|
{
|
||||||
nlwarning("Element %s not found while loading config, skipping datas", elemID.c_str());
|
nlwarning("Element %s not found while loading config, skipping datas", elemID.c_str());
|
||||||
|
|
|
@ -627,7 +627,7 @@ bool CInterfaceDDX::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
else if( stricmp((char*)cur->name,"apply") == 0 )
|
else if( stricmp((char*)cur->name,"apply") == 0 )
|
||||||
{
|
{
|
||||||
CXMLAutoPtr ptrUI((const char*)xmlGetProp (cur, (xmlChar*)"ui"));
|
CXMLAutoPtr ptrUI((const char*)xmlGetProp (cur, (xmlChar*)"ui"));
|
||||||
_ApplyButton = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(_Parent->getId(),(const char*)ptrUI));
|
_ApplyButton = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(_Parent->getId(),(const char*)ptrUI));
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
|
@ -1083,7 +1083,7 @@ public:
|
||||||
CDDXManager *pDM = CDDXManager::getInstance();
|
CDDXManager *pDM = CDDXManager::getInstance();
|
||||||
if (pCaller == NULL) return;
|
if (pCaller == NULL) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CCtrlBase *pCB = pIM->getCtrlLaunchingModal();
|
CCtrlBase *pCB = CWidgetManager::getInstance()->getCtrlLaunchingModal();
|
||||||
// Search for a ddx in the parents
|
// Search for a ddx in the parents
|
||||||
CInterfaceGroup *pIG = pCB->getParent();
|
CInterfaceGroup *pIG = pCB->getParent();
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
|
@ -120,7 +120,7 @@ static DECLARE_INTERFACE_USER_FCT(isOpen)
|
||||||
{
|
{
|
||||||
if (args.size() != 1) return false;
|
if (args.size() != 1) return false;
|
||||||
if (!args[0].toString()) return false;
|
if (!args[0].toString()) return false;
|
||||||
CGroupContainer *elm = dynamic_cast<CGroupContainer*>(CInterfaceManager::getInstance()->getElementFromId(args[0].getString()));
|
CGroupContainer *elm = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(args[0].getString()));
|
||||||
if (!elm)
|
if (!elm)
|
||||||
{
|
{
|
||||||
nlwarning("<isOpen> : can't find element %s", args[0].getString().c_str());
|
nlwarning("<isOpen> : can't find element %s", args[0].getString().c_str());
|
||||||
|
@ -733,7 +733,7 @@ static DECLARE_INTERFACE_USER_FCT(isCtrlLaunchModalMacro)
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
|
|
||||||
result.setBool( ctrl->isMacro() );
|
result.setBool( ctrl->isMacro() );
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ static DECLARE_INTERFACE_USER_FCT(getSheetFromId)
|
||||||
{
|
{
|
||||||
if (args.size() != 1 || !args[0].toString()) return false;
|
if (args.size() != 1 || !args[0].toString()) return false;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *sheet = dynamic_cast<CDBCtrlSheet *>(im->getElementFromId(args[0].getString()));
|
CDBCtrlSheet *sheet = dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getElementFromId(args[0].getString()));
|
||||||
if (!sheet)
|
if (!sheet)
|
||||||
{
|
{
|
||||||
nlwarning("Sheet %s not found", args[0].getString().c_str());
|
nlwarning("Sheet %s not found", args[0].getString().c_str());
|
||||||
|
|
|
@ -246,7 +246,7 @@ void CInterfaceGroup::setPriority(uint8 nprio)
|
||||||
{
|
{
|
||||||
if (nprio != _Priority)
|
if (nprio != _Priority)
|
||||||
{
|
{
|
||||||
CInterfaceManager::getInstance()->setWindowPriority(this, nprio);
|
CWidgetManager::getInstance()->setWindowPriority(this, nprio);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -477,7 +477,7 @@ bool CInterfaceLink::splitLinkTarget(const std::string &target, CInterfaceGroup
|
||||||
{
|
{
|
||||||
// try the absolute adress of the element
|
// try the absolute adress of the element
|
||||||
elmPath = target.substr(0, lastPos);
|
elmPath = target.substr(0, lastPos);
|
||||||
elm = CInterfaceManager::getInstance()->getElementFromId(elmPath);
|
elm = CWidgetManager::getInstance()->getElementFromId(elmPath);
|
||||||
elmProp = target.substr(lastPos + 1);
|
elmProp = target.substr(lastPos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ void CInterfaceLink::setTargetProperty (const std::string &Target, const CInt
|
||||||
// Eval target !
|
// Eval target !
|
||||||
string elt = Target.substr(0,Target.rfind(':'));
|
string elt = Target.substr(0,Target.rfind(':'));
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(elt);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(elt);
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIE);
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIE);
|
||||||
if (pIG == NULL)
|
if (pIG == NULL)
|
||||||
pIG = pIE->getParent();
|
pIG = pIE->getParent();
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -247,42 +247,8 @@ public:
|
||||||
* NB: "ctrl_launch_modal" is a special Id which return the last ctrl which has launch a modal. NULL if modal closed.
|
* NB: "ctrl_launch_modal" is a special Id which return the last ctrl which has launch a modal. NULL if modal closed.
|
||||||
* \param groupId : the Id of the window group
|
* \param groupId : the Id of the window group
|
||||||
*/
|
*/
|
||||||
CInterfaceElement* getElementFromId (const std::string &sEltId);
|
|
||||||
CInterfaceElement* getElementFromId (const std::string &sStart, const std::string &sEltId);
|
|
||||||
void activateMasterGroup (const std::string &sMasterGroupName, bool bActive);
|
|
||||||
/// get an element from a define ID. shortcut for getElementFromId(getDefine(define))
|
/// get an element from a define ID. shortcut for getElementFromId(getDefine(define))
|
||||||
CInterfaceElement* getElementFromDefine (const std::string &defineId);
|
CInterfaceElement* getElementFromDefine (const std::string &defineId);
|
||||||
/// Get the window from an element (ui:interface:###)
|
|
||||||
CInterfaceGroup* getWindow(CInterfaceElement*);
|
|
||||||
/**
|
|
||||||
* set the top window
|
|
||||||
* \param win : pointer to the window to be set on top
|
|
||||||
*/
|
|
||||||
void setTopWindow (CInterfaceGroup *pWin);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* set the back window
|
|
||||||
* \param win : pointer to the window to be set on top
|
|
||||||
*/
|
|
||||||
void setBackWindow (CInterfaceGroup *pWin);
|
|
||||||
|
|
||||||
/** get the top window in the first activated masterGroup
|
|
||||||
*/
|
|
||||||
CInterfaceGroup *getTopWindow (uint8 nPriority = WIN_PRIORITY_NORMAL) const;
|
|
||||||
|
|
||||||
/** get the back window in the first activated masterGroup
|
|
||||||
*/
|
|
||||||
CInterfaceGroup *getBackWindow (uint8 nPriority = WIN_PRIORITY_NORMAL) const;
|
|
||||||
|
|
||||||
/** get the last escapable top window in the first activated masterGroup
|
|
||||||
*/
|
|
||||||
CInterfaceGroup *getLastEscapableTopWindow() const;
|
|
||||||
|
|
||||||
void setWindowPriority (CInterfaceGroup *pWin, uint8 nPriority);
|
|
||||||
|
|
||||||
/** return the priority of the Last Window setTopWindow()-ed.
|
|
||||||
*/
|
|
||||||
uint8 getLastTopWindowPriority() const;
|
|
||||||
|
|
||||||
/// Control specific
|
/// Control specific
|
||||||
|
|
||||||
|
@ -305,30 +271,6 @@ public:
|
||||||
* NB : the keyboard capture is released on both calls.
|
* NB : the keyboard capture is released on both calls.
|
||||||
* NB : cascaded modal windows are disabled by the call
|
* NB : cascaded modal windows are disabled by the call
|
||||||
*/
|
*/
|
||||||
void enableModalWindow (CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG);
|
|
||||||
void enableModalWindow (CCtrlBase *ctrlLaunchingModal, const std::string &groupName);
|
|
||||||
// Disable all modals windows
|
|
||||||
void disableModalWindow ();
|
|
||||||
|
|
||||||
/** Push a modal window that becomes the current modal window
|
|
||||||
*/
|
|
||||||
void pushModalWindow(CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG);
|
|
||||||
void pushModalWindow (CCtrlBase *ctrlLaunchingModal, const std::string &groupName);
|
|
||||||
void popModalWindow();
|
|
||||||
// pop all top modal windows with the given category (a string stored in the modal)
|
|
||||||
void popModalWindowCategory(const std::string &category);
|
|
||||||
|
|
||||||
CCtrlBase *getCtrlLaunchingModal ()
|
|
||||||
{
|
|
||||||
if (_ModalStack.empty()) return NULL;
|
|
||||||
return _ModalStack.back().CtrlLaunchingModal;
|
|
||||||
}
|
|
||||||
/// get the currently active modal window, or NULL if none
|
|
||||||
CInterfaceGroup *getModalWindow() const
|
|
||||||
{
|
|
||||||
if (_ModalStack.empty()) return NULL;
|
|
||||||
return _ModalStack.back().ModalWindow;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Handle The Event. return true if the interfaceManager catch it and if must not send to the Game Action Manager
|
/// Handle The Event. return true if the interfaceManager catch it and if must not send to the Game Action Manager
|
||||||
|
@ -379,9 +321,6 @@ public:
|
||||||
uint8 getGlobalRolloverFactorContainer() const { return _GlobalRolloverFactorContainer; }
|
uint8 getGlobalRolloverFactorContainer() const { return _GlobalRolloverFactorContainer; }
|
||||||
|
|
||||||
|
|
||||||
/// Pointer
|
|
||||||
CViewPointer *getPointer () { return _Pointer; }
|
|
||||||
|
|
||||||
// Relative move of pointer
|
// Relative move of pointer
|
||||||
void movePointer (sint32 dx, sint32 dy);
|
void movePointer (sint32 dx, sint32 dy);
|
||||||
// Set absolute coordinates of pointer
|
// Set absolute coordinates of pointer
|
||||||
|
@ -770,33 +709,6 @@ private:
|
||||||
void buildRecursLocalLeaves(NLMISC::CCDBNodeBranch *branch, std::vector<NLMISC::CCDBNodeLeaf*> &leaves);
|
void buildRecursLocalLeaves(NLMISC::CCDBNodeBranch *branch, std::vector<NLMISC::CCDBNodeLeaf*> &leaves);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Infos about a modal window.
|
|
||||||
class CModalWndInfo
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// Yoyo: store as CRefPtr in case they are deleted (can happen for instance if menu right click on a guild memeber, and guild members are udpated after)
|
|
||||||
NLMISC::CRefPtr<CInterfaceGroup> ModalWindow; // the current modal window
|
|
||||||
NLMISC::CRefPtr<CCtrlBase> CtrlLaunchingModal;
|
|
||||||
bool ModalClip;
|
|
||||||
bool ModalExitClickOut;
|
|
||||||
bool ModalExitClickL;
|
|
||||||
bool ModalExitClickR;
|
|
||||||
bool ModalExitKeyPushed;
|
|
||||||
std::string ModalHandlerClickOut;
|
|
||||||
std::string ModalClickOutParams;
|
|
||||||
public:
|
|
||||||
CModalWndInfo()
|
|
||||||
{
|
|
||||||
ModalWindow = NULL;
|
|
||||||
CtrlLaunchingModal= NULL;
|
|
||||||
ModalExitClickOut= false;
|
|
||||||
ModalExitClickL= false;
|
|
||||||
ModalExitClickR= false;
|
|
||||||
ModalExitKeyPushed= false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// Database management stuff
|
// Database management stuff
|
||||||
class CDBLandmarkObs : public NLMISC::ICDBNode::IPropertyObserver
|
class CDBLandmarkObs : public NLMISC::ICDBNode::IPropertyObserver
|
||||||
{
|
{
|
||||||
|
@ -883,10 +795,6 @@ private:
|
||||||
NLMISC::CRefPtr<CCtrlBase> _CapturePointerRight;
|
NLMISC::CRefPtr<CCtrlBase> _CapturePointerRight;
|
||||||
bool _MouseOverWindow;
|
bool _MouseOverWindow;
|
||||||
|
|
||||||
std::vector<CModalWndInfo> _ModalStack;
|
|
||||||
static std::string _CtrlLaunchingModalId;
|
|
||||||
|
|
||||||
|
|
||||||
// view that should be notified from clock msg
|
// view that should be notified from clock msg
|
||||||
std::vector<CCtrlBase*> _ClockMsgTargets;
|
std::vector<CCtrlBase*> _ClockMsgTargets;
|
||||||
|
|
||||||
|
@ -898,8 +806,7 @@ private:
|
||||||
|
|
||||||
// Context Help
|
// Context Help
|
||||||
bool _ContextHelpActive;
|
bool _ContextHelpActive;
|
||||||
CCtrlBasePtr _CurCtrlContextHelp;
|
//CCtrlBasePtr _CurCtrlContextHelp;
|
||||||
float _DeltaTimeStopingContextHelp;
|
|
||||||
//Delay before displaying ContextHelp on a ctrl having wantInstantContextHelp set to false (in seconds)
|
//Delay before displaying ContextHelp on a ctrl having wantInstantContextHelp set to false (in seconds)
|
||||||
float _MaxTimeStopingContextHelp;
|
float _MaxTimeStopingContextHelp;
|
||||||
sint _LastXContextHelp;
|
sint _LastXContextHelp;
|
||||||
|
|
|
@ -299,17 +299,12 @@ private:
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
CInterfaceParser::CInterfaceParser()
|
CInterfaceParser::CInterfaceParser()
|
||||||
{
|
{
|
||||||
_Pointer= NULL;
|
|
||||||
|
|
||||||
// LUA
|
// LUA
|
||||||
_LuaState= NULL;
|
_LuaState= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceParser::~CInterfaceParser()
|
CInterfaceParser::~CInterfaceParser()
|
||||||
{
|
{
|
||||||
// delete _Pointer;
|
|
||||||
_Pointer = NULL;
|
|
||||||
//delete _LuaState;
|
|
||||||
_LuaState = NULL;
|
_LuaState = NULL;
|
||||||
}
|
}
|
||||||
/** Convert a string into a memstream
|
/** Convert a string into a memstream
|
||||||
|
@ -1745,7 +1740,7 @@ bool CInterfaceParser::parseView(xmlNodePtr cur, CInterfaceGroup * parentGroup,
|
||||||
|
|
||||||
if ( !strcmp(ptr,"pointer"))
|
if ( !strcmp(ptr,"pointer"))
|
||||||
{
|
{
|
||||||
_Pointer = dynamic_cast<CViewPointer*>(view);
|
CWidgetManager::getInstance()->setPointer( dynamic_cast<CViewPointer*>(view) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//nlinfo("view type %s mem : %d",ptr,view->getMemory());
|
//nlinfo("view type %s mem : %d",ptr,view->getMemory());
|
||||||
|
@ -3491,7 +3486,7 @@ CInterfaceElement *CInterfaceParser::createUIElement(const std::string &template
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE= pIM->getElementFromId(parentID);
|
CInterfaceElement *pIE= CWidgetManager::getInstance()->getElementFromId(parentID);
|
||||||
CInterfaceGroup * parentGroup = dynamic_cast<CInterfaceGroup*>(pIE);
|
CInterfaceGroup * parentGroup = dynamic_cast<CInterfaceGroup*>(pIE);
|
||||||
|
|
||||||
if(!parentGroup)
|
if(!parentGroup)
|
||||||
|
|
|
@ -248,8 +248,6 @@ protected:
|
||||||
* Data of initialized interface
|
* Data of initialized interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CViewPointer *_Pointer;
|
|
||||||
|
|
||||||
// Options description
|
// Options description
|
||||||
std::map<std::string, NLMISC::CSmartPtr<CInterfaceOptions> > _OptionsMap;
|
std::map<std::string, NLMISC::CSmartPtr<CInterfaceOptions> > _OptionsMap;
|
||||||
|
|
||||||
|
|
|
@ -331,44 +331,44 @@ void CInventoryManager::init()
|
||||||
DNDCurrentItem = NULL;
|
DNDCurrentItem = NULL;
|
||||||
DNDFrom = Nowhere;
|
DNDFrom = Nowhere;
|
||||||
// Initialize interface part
|
// Initialize interface part
|
||||||
UIHands[0] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_HAND_RIGHT));
|
UIHands[0] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_RIGHT));
|
||||||
UIHands[1] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_HAND_LEFT));
|
UIHands[1] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_LEFT));
|
||||||
|
|
||||||
UIEquip[SLOT_EQUIPMENT::HEADDRESS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_HEADDRESS));
|
UIEquip[SLOT_EQUIPMENT::HEADDRESS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_HEADDRESS));
|
||||||
UIEquip[SLOT_EQUIPMENT::EARL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_EARING_LEFT));
|
UIEquip[SLOT_EQUIPMENT::EARL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_EARING_LEFT));
|
||||||
UIEquip[SLOT_EQUIPMENT::EARR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_EARING_RIGHT));
|
UIEquip[SLOT_EQUIPMENT::EARR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_EARING_RIGHT));
|
||||||
UIEquip[SLOT_EQUIPMENT::NECKLACE] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_NECK));
|
UIEquip[SLOT_EQUIPMENT::NECKLACE] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_NECK));
|
||||||
UIEquip[SLOT_EQUIPMENT::WRISTL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_BRACELET_LEFT));
|
UIEquip[SLOT_EQUIPMENT::WRISTL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_BRACELET_LEFT));
|
||||||
UIEquip[SLOT_EQUIPMENT::WRISTR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_BRACELET_RIGHT));
|
UIEquip[SLOT_EQUIPMENT::WRISTR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_BRACELET_RIGHT));
|
||||||
UIEquip[SLOT_EQUIPMENT::FINGERL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_RING_LEFT));
|
UIEquip[SLOT_EQUIPMENT::FINGERL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_RING_LEFT));
|
||||||
UIEquip[SLOT_EQUIPMENT::FINGERR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_RING_RIGHT));
|
UIEquip[SLOT_EQUIPMENT::FINGERR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_RING_RIGHT));
|
||||||
UIEquip[SLOT_EQUIPMENT::ANKLEL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_ANKLET_LEFT));
|
UIEquip[SLOT_EQUIPMENT::ANKLEL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_ANKLET_LEFT));
|
||||||
UIEquip[SLOT_EQUIPMENT::ANKLER] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWEL_ANKLET_RIGHT));
|
UIEquip[SLOT_EQUIPMENT::ANKLER] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWEL_ANKLET_RIGHT));
|
||||||
|
|
||||||
UIEquip[SLOT_EQUIPMENT::HEAD] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_HEAD));
|
UIEquip[SLOT_EQUIPMENT::HEAD] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_HEAD));
|
||||||
UIEquip[SLOT_EQUIPMENT::CHEST] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_CHEST));
|
UIEquip[SLOT_EQUIPMENT::CHEST] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_CHEST));
|
||||||
UIEquip[SLOT_EQUIPMENT::ARMS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_ARMS));
|
UIEquip[SLOT_EQUIPMENT::ARMS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_ARMS));
|
||||||
UIEquip[SLOT_EQUIPMENT::FEET] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_FEET));
|
UIEquip[SLOT_EQUIPMENT::FEET] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_FEET));
|
||||||
UIEquip[SLOT_EQUIPMENT::LEGS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_LEGS));
|
UIEquip[SLOT_EQUIPMENT::LEGS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_LEGS));
|
||||||
UIEquip[SLOT_EQUIPMENT::HANDS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMOR_HANDS));
|
UIEquip[SLOT_EQUIPMENT::HANDS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMOR_HANDS));
|
||||||
|
|
||||||
UIEquip2[SLOT_EQUIPMENT::HEADDRESS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_HEADDRESS));
|
UIEquip2[SLOT_EQUIPMENT::HEADDRESS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_HEADDRESS));
|
||||||
UIEquip2[SLOT_EQUIPMENT::EARL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_EARING_LEFT));
|
UIEquip2[SLOT_EQUIPMENT::EARL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_EARING_LEFT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::EARR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_EARING_RIGHT));
|
UIEquip2[SLOT_EQUIPMENT::EARR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_EARING_RIGHT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::NECKLACE] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_NECK));
|
UIEquip2[SLOT_EQUIPMENT::NECKLACE] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_NECK));
|
||||||
UIEquip2[SLOT_EQUIPMENT::WRISTL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_BRACELET_LEFT));
|
UIEquip2[SLOT_EQUIPMENT::WRISTL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_BRACELET_LEFT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::WRISTR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_BRACELET_RIGHT));
|
UIEquip2[SLOT_EQUIPMENT::WRISTR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_BRACELET_RIGHT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::FINGERL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_RING_LEFT));
|
UIEquip2[SLOT_EQUIPMENT::FINGERL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_RING_LEFT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::FINGERR] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_RING_RIGHT));
|
UIEquip2[SLOT_EQUIPMENT::FINGERR] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_RING_RIGHT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::ANKLEL] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_ANKLET_LEFT));
|
UIEquip2[SLOT_EQUIPMENT::ANKLEL] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_ANKLET_LEFT));
|
||||||
UIEquip2[SLOT_EQUIPMENT::ANKLER] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_JEWL2_ANKLET_RIGHT));
|
UIEquip2[SLOT_EQUIPMENT::ANKLER] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_JEWL2_ANKLET_RIGHT));
|
||||||
|
|
||||||
UIEquip2[SLOT_EQUIPMENT::HEAD] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_HEAD));
|
UIEquip2[SLOT_EQUIPMENT::HEAD] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_HEAD));
|
||||||
UIEquip2[SLOT_EQUIPMENT::CHEST] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_CHEST));
|
UIEquip2[SLOT_EQUIPMENT::CHEST] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_CHEST));
|
||||||
UIEquip2[SLOT_EQUIPMENT::ARMS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_ARMS));
|
UIEquip2[SLOT_EQUIPMENT::ARMS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_ARMS));
|
||||||
UIEquip2[SLOT_EQUIPMENT::FEET] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_FEET));
|
UIEquip2[SLOT_EQUIPMENT::FEET] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_FEET));
|
||||||
UIEquip2[SLOT_EQUIPMENT::LEGS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_LEGS));
|
UIEquip2[SLOT_EQUIPMENT::LEGS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_LEGS));
|
||||||
UIEquip2[SLOT_EQUIPMENT::HANDS] = dynamic_cast<CDBCtrlSheet*>(im->getElementFromId(CTRL_ARMR2_HANDS));
|
UIEquip2[SLOT_EQUIPMENT::HANDS] = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_ARMR2_HANDS));
|
||||||
|
|
||||||
|
|
||||||
// Init ItemInfoObservers
|
// Init ItemInfoObservers
|
||||||
|
@ -662,7 +662,7 @@ static void grayItem (const std::string &listname, sint32 bagEntryIndex, bool gr
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
IListSheetBase *pList = dynamic_cast<IListSheetBase*>(pIM->getElementFromId(listname));
|
IListSheetBase *pList = dynamic_cast<IListSheetBase*>(CWidgetManager::getInstance()->getElementFromId(listname));
|
||||||
|
|
||||||
if (pList != NULL)
|
if (pList != NULL)
|
||||||
{
|
{
|
||||||
|
@ -787,7 +787,7 @@ void CInventoryManager::equip(const std::string &bagPath, const std::string &inv
|
||||||
sint16 oldRightIndexInBag = NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
sint16 oldRightIndexInBag = NLGUI::CDBManager::getInstance()->getDbProp(invPath + ":INDEX_IN_BAG")->getValue16();
|
||||||
if (inventory == INVENTORIES::handling && invSlot == 0)
|
if (inventory == INVENTORIES::handling && invSlot == 0)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_LEFT));
|
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_LEFT));
|
||||||
if (pCSLeftHand == NULL)
|
if (pCSLeftHand == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -919,7 +919,7 @@ void CInventoryManager::unequip(const std::string &invPath)
|
||||||
// Hands management : check if we have to unequip left hand because of incompatibility with right hand item
|
// Hands management : check if we have to unequip left hand because of incompatibility with right hand item
|
||||||
if (inventory == INVENTORIES::handling && invSlot == 0)
|
if (inventory == INVENTORIES::handling && invSlot == 0)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_LEFT));
|
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_LEFT));
|
||||||
if (pCSLeftHand == NULL)
|
if (pCSLeftHand == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -1073,8 +1073,8 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
// Set database for wearing the right item
|
// Set database for wearing the right item
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sIE));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sIE));
|
||||||
CDBCtrlSheet *pCS2 = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sIE2));
|
CDBCtrlSheet *pCS2 = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sIE2));
|
||||||
|
|
||||||
// Remove Last reference and update database
|
// Remove Last reference and update database
|
||||||
sint16 oldVal = pNL->getOldValue16();
|
sint16 oldVal = pNL->getOldValue16();
|
||||||
|
@ -1105,7 +1105,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
||||||
if (sIE == CTRL_HAND_RIGHT)
|
if (sIE == CTRL_HAND_RIGHT)
|
||||||
{
|
{
|
||||||
// if nothing in left hand -> return
|
// if nothing in left hand -> return
|
||||||
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_LEFT));
|
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_LEFT));
|
||||||
if (pCSLeftHand == NULL)
|
if (pCSLeftHand == NULL)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -1184,7 +1184,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
||||||
// left hand item is changing
|
// left hand item is changing
|
||||||
if (sIE == CTRL_HAND_LEFT)
|
if (sIE == CTRL_HAND_LEFT)
|
||||||
{
|
{
|
||||||
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_LEFT));
|
CDBCtrlSheet *pCSLeftHand = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_LEFT));
|
||||||
if ( pCSLeftHand )
|
if ( pCSLeftHand )
|
||||||
{
|
{
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
|
@ -1196,7 +1196,7 @@ void CInventoryManager::CDBEquipObs::update(ICDBNode* node)
|
||||||
{
|
{
|
||||||
// check if we clear display (have to manage 2 hands weapons for instance)
|
// check if we clear display (have to manage 2 hands weapons for instance)
|
||||||
bool clearLeftHandDisplay = true;
|
bool clearLeftHandDisplay = true;
|
||||||
CDBCtrlSheet * pCSRightHand = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_HAND_RIGHT));
|
CDBCtrlSheet * pCSRightHand = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_HAND_RIGHT));
|
||||||
if ( pCSRightHand && pCSRightHand->getSheetId() )
|
if ( pCSRightHand && pCSRightHand->getSheetId() )
|
||||||
{
|
{
|
||||||
CCDBNodeLeaf *pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false);
|
CCDBNodeLeaf *pNL3 = NLGUI::CDBManager::getInstance()->getDbProp(LOCAL_INVENTORY ":HAND:0:INDEX_IN_BAG", false);
|
||||||
|
@ -1272,7 +1272,7 @@ bool CInventoryManager::autoEquip(sint bagEntryIndex, bool allowReplace)
|
||||||
uint i;
|
uint i;
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
IListSheetBase *pList = dynamic_cast<IListSheetBase*>(pIM->getElementFromId(LIST_BAG_TEXT));
|
IListSheetBase *pList = dynamic_cast<IListSheetBase*>(CWidgetManager::getInstance()->getElementFromId(LIST_BAG_TEXT));
|
||||||
CDBCtrlSheet *pCSSrc = NULL;
|
CDBCtrlSheet *pCSSrc = NULL;
|
||||||
|
|
||||||
if (pList == NULL) return false;
|
if (pList == NULL) return false;
|
||||||
|
@ -1705,7 +1705,7 @@ void CTempInvManager::update()
|
||||||
|
|
||||||
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||||
|
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
if (pGC == NULL)
|
if (pGC == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1774,7 +1774,7 @@ void CTempInvManager::updateType()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
_Mode = (TEMP_INV_MODE::TInventoryMode)NLGUI::CDBManager::getInstance()->getDbProp("LOCAL:INVENTORY:TEMP:TYPE")->getValue8();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
// Something arrived, change text
|
// Something arrived, change text
|
||||||
switch(_Mode)
|
switch(_Mode)
|
||||||
{
|
{
|
||||||
|
@ -1837,7 +1837,7 @@ void CTempInvManager::updateForageQQ( uint whichOne )
|
||||||
ucstring title = CI18N::get( WIN_TEMPINV_TITLE_FORAGING );
|
ucstring title = CI18N::get( WIN_TEMPINV_TITLE_FORAGING );
|
||||||
strFindReplace( title, "%qt", toString( "%.1f", qt ) );
|
strFindReplace( title, "%qt", toString( "%.1f", qt ) );
|
||||||
strFindReplace( title, "%ql", toString( "%.1f", ql ) );
|
strFindReplace( title, "%ql", toString( "%.1f", ql ) );
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
pGC->setUCTitle( title );
|
pGC->setUCTitle( title );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1849,7 +1849,7 @@ void CTempInvManager::open(TEMP_INV_MODE::TInventoryMode m)
|
||||||
{
|
{
|
||||||
_Mode = m;
|
_Mode = m;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
|
|
||||||
// In Foraging mode, we can call open() on the inventory with the same contents (e.g. when changing Forage action)
|
// In Foraging mode, we can call open() on the inventory with the same contents (e.g. when changing Forage action)
|
||||||
if ( _Mode != TEMP_INV_MODE::Forage )
|
if ( _Mode != TEMP_INV_MODE::Forage )
|
||||||
|
@ -1902,7 +1902,7 @@ void CTempInvManager::close()
|
||||||
pNL->setValue32(0);
|
pNL->setValue32(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WIN_TEMPINV));
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
if (pIG != NULL)
|
if (pIG != NULL)
|
||||||
{
|
{
|
||||||
pIG->setActive(false);
|
pIG->setActive(false);
|
||||||
|
@ -1914,7 +1914,7 @@ void CTempInvManager::close()
|
||||||
bool CTempInvManager::isOpened()
|
bool CTempInvManager::isOpened()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_TEMPINV));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_TEMPINV));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
return pGC->getActive();
|
return pGC->getActive();
|
||||||
return false;
|
return false;
|
||||||
|
@ -2313,7 +2313,7 @@ bool CDBGroupListSheetFilterCLMSlot::CSheetChildFilter::isSheetValid(CDBGroupLis
|
||||||
Plus the ChildControl must not be locked
|
Plus the ChildControl must not be locked
|
||||||
*/
|
*/
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBCtrlSheet *clmCtrl = dynamic_cast<CDBCtrlSheet*>(pIM->getCtrlLaunchingModal());
|
CDBCtrlSheet *clmCtrl = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (!clmCtrl || !Ctrl) return false;
|
if (!clmCtrl || !Ctrl) return false;
|
||||||
if (clmCtrl->getInventoryIndex() == INVENTORIES::exchange &&
|
if (clmCtrl->getInventoryIndex() == INVENTORIES::exchange &&
|
||||||
Ctrl->getInventoryIndex() == INVENTORIES::exchange)
|
Ctrl->getInventoryIndex() == INVENTORIES::exchange)
|
||||||
|
@ -2467,7 +2467,7 @@ class CHandlerInvCanDropTo : public IActionHandler
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
if (pCSSrc == NULL) return; // Cannot do anything if the incoming sheet is not a sheet
|
if (pCSSrc == NULL) return; // Cannot do anything if the incoming sheet is not a sheet
|
||||||
|
|
||||||
|
@ -2618,14 +2618,14 @@ class CHandlerInvDropTo : public IActionHandler
|
||||||
// To prevent other things to happens
|
// To prevent other things to happens
|
||||||
if (!getInventory().isDragging())
|
if (!getInventory().isDragging())
|
||||||
{
|
{
|
||||||
CInterfaceGroup *pIG = pIM->getModalWindow();
|
CInterfaceGroup *pIG = CWidgetManager::getInstance()->getModalWindow();
|
||||||
if (pIG == NULL) return;
|
if (pIG == NULL) return;
|
||||||
if (pIG->getId() != "ui:interface:bag_choose") return;
|
if (pIG->getId() != "ui:interface:bag_choose") return;
|
||||||
getInventory().beginDrag(NULL, CInventoryManager::TextList);
|
getInventory().beginDrag(NULL, CInventoryManager::TextList);
|
||||||
|
|
||||||
// Special case for choose in bag dialog
|
// Special case for choose in bag dialog
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
|
|
||||||
|
@ -2642,7 +2642,7 @@ class CHandlerInvDropTo : public IActionHandler
|
||||||
}
|
}
|
||||||
|
|
||||||
string src = getParam(Params, "src");
|
string src = getParam(Params, "src");
|
||||||
CInterfaceElement *pElt = pIM->getElementFromId(src);
|
CInterfaceElement *pElt = CWidgetManager::getInstance()->getElementFromId(src);
|
||||||
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
CDBCtrlSheet *pCSSrc = dynamic_cast<CDBCtrlSheet*>(pElt);
|
||||||
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
CDBCtrlSheet *pCSDst = dynamic_cast<CDBCtrlSheet*>(pCaller);
|
||||||
if (pCSSrc == NULL) return;
|
if (pCSSrc == NULL) return;
|
||||||
|
@ -3309,39 +3309,39 @@ void CInventoryManager::sortBag()
|
||||||
CDBGroupIconListBag *pIconList;
|
CDBGroupIconListBag *pIconList;
|
||||||
CDBGroupListSheetBag *pList;
|
CDBGroupListSheetBag *pList;
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_BAG_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_BAG_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_BAG_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_BAG_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_ROOM_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_ROOM_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_ROOM_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_ROOM_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_GUILD_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_GUILD_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_GUILD_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_GUILD_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_PA0_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA0_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_PA0_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA0_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_PA1_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA1_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_PA1_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA1_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_PA2_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA2_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_PA2_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA2_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
|
|
||||||
pIconList = dynamic_cast<CDBGroupIconListBag*>(pIM->getElementFromId(LIST_PA3_ICONS));
|
pIconList = dynamic_cast<CDBGroupIconListBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA3_ICONS));
|
||||||
if (pIconList != NULL) pIconList->needToSort();
|
if (pIconList != NULL) pIconList->needToSort();
|
||||||
pList = dynamic_cast<CDBGroupListSheetBag*>(pIM->getElementFromId(LIST_PA3_TEXT));
|
pList = dynamic_cast<CDBGroupListSheetBag*>(CWidgetManager::getInstance()->getElementFromId(LIST_PA3_TEXT));
|
||||||
if (pList != NULL) pList->needToSort();
|
if (pList != NULL) pList->needToSort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1019,7 +1019,7 @@ int CLuaIHMRyzom::getUI(CLuaState &ls)
|
||||||
|
|
||||||
// return the element
|
// return the element
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE= pIM->getElementFromId(eltStr);
|
CInterfaceElement *pIE= CWidgetManager::getInstance()->getElementFromId(eltStr);
|
||||||
if(!pIE)
|
if(!pIE)
|
||||||
{
|
{
|
||||||
ls.pushNil();
|
ls.pushNil();
|
||||||
|
@ -1504,7 +1504,7 @@ int CLuaIHMRyzom::setTopWindow(CLuaState &ls)
|
||||||
CLuaIHM::fails(ls, "%s : interface group expected as arg 1", funcName);
|
CLuaIHM::fails(ls, "%s : interface group expected as arg 1", funcName);
|
||||||
}
|
}
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->setTopWindow(wnd);
|
CWidgetManager::getInstance()->setTopWindow(wnd);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1739,7 +1739,7 @@ int CLuaIHMRyzom::initEmotesMenu(CLuaState &ls)
|
||||||
|
|
||||||
betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT);
|
betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT);
|
||||||
|
|
||||||
CGroupMenu *pInitRootMenu = dynamic_cast<CGroupMenu*>(pIM->getElementFromId(emoteMenu));
|
CGroupMenu *pInitRootMenu = dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId(emoteMenu));
|
||||||
pInitRootMenu->reset();
|
pInitRootMenu->reset();
|
||||||
|
|
||||||
for (std::list<CEmoteStruct>::const_iterator it = entries.begin(); it != entries.end(); it++)
|
for (std::list<CEmoteStruct>::const_iterator it = entries.begin(); it != entries.end(); it++)
|
||||||
|
@ -1768,7 +1768,7 @@ int CLuaIHMRyzom::initEmotesMenu(CLuaState &ls)
|
||||||
if (sName[i] == '|')
|
if (sName[i] == '|')
|
||||||
nbToken++;
|
nbToken++;
|
||||||
|
|
||||||
CGroupMenu *pRootMenu = dynamic_cast<CGroupMenu*>(pIM->getElementFromId(emoteMenu));
|
CGroupMenu *pRootMenu = dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId(emoteMenu));
|
||||||
CGroupSubMenu *pMenu = pRootMenu->getRootMenu();
|
CGroupSubMenu *pMenu = pRootMenu->getRootMenu();
|
||||||
|
|
||||||
for (i = 0; i < nbToken; ++i)
|
for (i = 0; i < nbToken; ++i)
|
||||||
|
@ -1999,13 +1999,13 @@ int CLuaIHMRyzom::enableModalWindow(CLuaState &ls)
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( pIM->getElementFromId(modalId) );
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>( CWidgetManager::getInstance()->getElementFromId(modalId) );
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
UserControls.stopFreeLook();
|
UserControls.stopFreeLook();
|
||||||
|
|
||||||
// enable the modal
|
// enable the modal
|
||||||
pIM->enableModalWindow(ctrl, group);
|
CWidgetManager::getInstance()->enableModalWindow(ctrl, group);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2024,7 +2024,7 @@ int CLuaIHMRyzom::disableModalWindow(CLuaState &ls)
|
||||||
//H_AUTO(Lua_CLuaIHM_disableModalWindow)
|
//H_AUTO(Lua_CLuaIHM_disableModalWindow)
|
||||||
CLuaIHM::checkArgCount(ls, "disableModalWindow", 0);
|
CLuaIHM::checkArgCount(ls, "disableModalWindow", 0);
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2555,7 +2555,7 @@ int CLuaIHMRyzom::createRootGroupInstance(CLuaState &ls)
|
||||||
result->setId("ui:interface:"+string(ls.toString(2)));
|
result->setId("ui:interface:"+string(ls.toString(2)));
|
||||||
result->updateCoords();
|
result->updateCoords();
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", result);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", result);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
result->setParent(pRoot);
|
result->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup(result);
|
pRoot->addGroup(result);
|
||||||
|
@ -3271,7 +3271,7 @@ void CLuaIHMRyzom::browseNpcWebPage(const std::string &htmlId, const std::string
|
||||||
{
|
{
|
||||||
//H_AUTO(Lua_CLuaIHM_browseNpcWebPage)
|
//H_AUTO(Lua_CLuaIHM_browseNpcWebPage)
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CGroupHTML *groupHtml= dynamic_cast<CGroupHTML*>(pIM->getElementFromId(htmlId));
|
CGroupHTML *groupHtml= dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(htmlId));
|
||||||
if(groupHtml)
|
if(groupHtml)
|
||||||
{
|
{
|
||||||
// if true, it means that we want to display a web page that use webig auth
|
// if true, it means that we want to display a web page that use webig auth
|
||||||
|
@ -3343,7 +3343,7 @@ void CLuaIHMRyzom::clearHtmlUndoRedo(const std::string &htmlId)
|
||||||
{
|
{
|
||||||
//H_AUTO(Lua_CLuaIHM_clearHtmlUndoRedo)
|
//H_AUTO(Lua_CLuaIHM_clearHtmlUndoRedo)
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CGroupHTML *groupHtml= dynamic_cast<CGroupHTML*>(pIM->getElementFromId(htmlId));
|
CGroupHTML *groupHtml= dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(htmlId));
|
||||||
if(groupHtml)
|
if(groupHtml)
|
||||||
groupHtml->clearUndoRedo();
|
groupHtml->clearUndoRedo();
|
||||||
}
|
}
|
||||||
|
@ -3609,7 +3609,7 @@ void CLuaIHMRyzom::tell(const ucstring &player, const ucstring &msg)
|
||||||
if (w->getContainer())
|
if (w->getContainer())
|
||||||
{
|
{
|
||||||
w->getContainer()->setActive(true);
|
w->getContainer()->setActive(true);
|
||||||
im->setTopWindow(w->getContainer());
|
CWidgetManager::getInstance()->setTopWindow(w->getContainer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ public:
|
||||||
for (uint i = 0; i < rCats.size(); ++i)
|
for (uint i = 0; i < rCats.size(); ++i)
|
||||||
{
|
{
|
||||||
string contName = string(WIN_KEYS_GAME)+rCats[i].Name;
|
string contName = string(WIN_KEYS_GAME)+rCats[i].Name;
|
||||||
pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(contName));
|
pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(contName));
|
||||||
if(pGC != NULL)
|
if(pGC != NULL)
|
||||||
{
|
{
|
||||||
pGC->setX(0);
|
pGC->setX(0);
|
||||||
|
@ -259,8 +259,8 @@ public:
|
||||||
for (uint i = 0; i < rCats.size(); ++i)
|
for (uint i = 0; i < rCats.size(); ++i)
|
||||||
{
|
{
|
||||||
string contName = string(WIN_KEYS_GAME)+rCats[i].Name;
|
string contName = string(WIN_KEYS_GAME)+rCats[i].Name;
|
||||||
CInterfaceGroup *pCategory = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(contName));
|
CInterfaceGroup *pCategory = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(contName));
|
||||||
CGroupList *pList = dynamic_cast<CGroupList*>(pIM->getElementFromId(contName + ":content"));
|
CGroupList *pList = dynamic_cast<CGroupList*>(CWidgetManager::getInstance()->getElementFromId(contName + ":content"));
|
||||||
if (pCategory != NULL && pList != NULL)
|
if (pCategory != NULL && pList != NULL)
|
||||||
{
|
{
|
||||||
pList->clearGroups();
|
pList->clearGroups();
|
||||||
|
@ -317,9 +317,9 @@ public:
|
||||||
|
|
||||||
pMCM->NewKey->CurrentEditCmdLine = pMCM->NewKey->AllLines[nLineNb];
|
pMCM->NewKey->CurrentEditCmdLine = pMCM->NewKey->AllLines[nLineNb];
|
||||||
pMCM->NewKey->CurAM = pMCM->ActionManagers[pMCM->NewKey->AllLines[nLineNb].ComboAM];
|
pMCM->NewKey->CurAM = pMCM->ActionManagers[pMCM->NewKey->AllLines[nLineNb].ComboAM];
|
||||||
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(pIM->getElementFromId(WIN_MODAL_GET_KEY));
|
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(CWidgetManager::getInstance()->getElementFromId(WIN_MODAL_GET_KEY));
|
||||||
pGetKey->Caller = "editkey";
|
pGetKey->Caller = "editkey";
|
||||||
pIM->enableModalWindow(pCaller, WIN_MODAL_GET_KEY);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, WIN_MODAL_GET_KEY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerKeysAssign, "keys_assign");
|
REGISTER_ACTION_HANDLER( CHandlerKeysAssign, "keys_assign");
|
||||||
|
@ -433,11 +433,11 @@ void CModalContainerEditCmd::create(const std::string &name, bool bDefKey, bool
|
||||||
WinName = "ui:interface:" + name;
|
WinName = "ui:interface:" + name;
|
||||||
|
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", Win);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", Win);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
Win->setParent(pRoot);
|
Win->setParent(pRoot);
|
||||||
pRoot->addGroup(Win);
|
pRoot->addGroup(Win);
|
||||||
|
|
||||||
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_KEY_GROUP));
|
CInterfaceGroup *pIG = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_KEY_GROUP));
|
||||||
if (pIG != NULL) pIG->setActive (CanDefineKey);
|
if (pIG != NULL) pIG->setActive (CanDefineKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -458,7 +458,7 @@ void CModalContainerEditCmd::activate()
|
||||||
Win->launch();
|
Win->launch();
|
||||||
// Initialisation of category combo box
|
// Initialisation of category combo box
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( WinName+WIN_EDITCMD_COMBO_CATEGORY ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( WinName+WIN_EDITCMD_COMBO_CATEGORY ));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
{
|
{
|
||||||
CurrentEditCmdCategories.clear();
|
CurrentEditCmdCategories.clear();
|
||||||
|
@ -493,7 +493,7 @@ void CModalContainerEditCmd::activate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Clean up all actions
|
// Clean up all actions
|
||||||
pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( WinName+WIN_EDITCMD_COMBO_ACTION ));
|
pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( WinName+WIN_EDITCMD_COMBO_ACTION ));
|
||||||
if (pCB != NULL) pCB->resetTexts();
|
if (pCB != NULL) pCB->resetTexts();
|
||||||
// Clean up
|
// Clean up
|
||||||
CurAM = NULL;
|
CurAM = NULL;
|
||||||
|
@ -504,9 +504,9 @@ void CModalContainerEditCmd::activate()
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp1P )->setValue32(-1);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||||
// reset name of params
|
// reset name of params
|
||||||
CViewText *pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
CViewText *pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
invalidCurrentCommand();
|
invalidCurrentCommand();
|
||||||
}
|
}
|
||||||
|
@ -579,13 +579,13 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
|
|
||||||
// Set category : Search the right category
|
// Set category : Search the right category
|
||||||
CDBGroupComboBox *pCB;
|
CDBGroupComboBox *pCB;
|
||||||
pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(WinName+WIN_EDITCMD_COMBO_CATEGORY));
|
pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(WinName+WIN_EDITCMD_COMBO_CATEGORY));
|
||||||
pCB->setSelection(catCBIndex);
|
pCB->setSelection(catCBIndex);
|
||||||
onChangeCategory();
|
onChangeCategory();
|
||||||
IngameDbMngr.flushObserverCalls();
|
IngameDbMngr.flushObserverCalls();
|
||||||
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
NLGUI::CDBManager::getInstance()->flushObserverCalls();
|
||||||
//pIM->runActionHandler("editcmd_change_category",NULL);
|
//pIM->runActionHandler("editcmd_change_category",NULL);
|
||||||
pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(WinName+WIN_EDITCMD_COMBO_ACTION));
|
pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(WinName+WIN_EDITCMD_COMBO_ACTION));
|
||||||
pCB->setSelection(actCBIndex);
|
pCB->setSelection(actCBIndex);
|
||||||
onChangeAction();
|
onChangeAction();
|
||||||
IngameDbMngr.flushObserverCalls();
|
IngameDbMngr.flushObserverCalls();
|
||||||
|
@ -658,7 +658,7 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
string sCombo;
|
string sCombo;
|
||||||
if (noParam == 0) sCombo = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_LIST;
|
if (noParam == 0) sCombo = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_LIST;
|
||||||
else sCombo = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_LIST;
|
else sCombo = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_LIST;
|
||||||
pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(sCombo));
|
pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(sCombo));
|
||||||
pCB->setSelection(nPinCB);
|
pCB->setSelection(nPinCB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -670,7 +670,7 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
string sEditBox;
|
string sEditBox;
|
||||||
if (noParam == 0) sEditBox = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
if (noParam == 0) sEditBox = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
||||||
else sEditBox = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
else sEditBox = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
||||||
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(sEditBox));
|
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(sEditBox));
|
||||||
// sTmp is utf8
|
// sTmp is utf8
|
||||||
pEB->setInputStringAsUtf8(sTmp);
|
pEB->setInputStringAsUtf8(sTmp);
|
||||||
}
|
}
|
||||||
|
@ -681,7 +681,7 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
string sText;
|
string sText;
|
||||||
if (noParam == 0) sText = WinName+VIEW_EDITCMD_FIRST_PARAM_NAME;
|
if (noParam == 0) sText = WinName+VIEW_EDITCMD_FIRST_PARAM_NAME;
|
||||||
else sText = WinName+VIEW_EDITCMD_SECOND_PARAM_NAME;
|
else sText = WinName+VIEW_EDITCMD_SECOND_PARAM_NAME;
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(sText));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(sText));
|
||||||
if (pVT != NULL) pVT->setText(CI18N::get(pBA->Parameters[i].LocalizedName));
|
if (pVT != NULL) pVT->setText(CI18N::get(pBA->Parameters[i].LocalizedName));
|
||||||
noParam++;
|
noParam++;
|
||||||
}
|
}
|
||||||
|
@ -693,7 +693,7 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
CActionsManager::TActionComboMap::const_iterator it = actionCombo.find(CurrentEditCmdLine.ActionName);
|
CActionsManager::TActionComboMap::const_iterator it = actionCombo.find(CurrentEditCmdLine.ActionName);
|
||||||
|
|
||||||
// Deactive the key definition (we are in edit key mode)
|
// Deactive the key definition (we are in edit key mode)
|
||||||
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
CCtrlBaseButton *pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
||||||
if (pBut != NULL) pBut->setActive(false);
|
if (pBut != NULL) pBut->setActive(false);
|
||||||
|
|
||||||
if (it != actionCombo.end())
|
if (it != actionCombo.end())
|
||||||
|
@ -701,13 +701,13 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
|
||||||
CurrentEditCmdLine.Combo = it->second;
|
CurrentEditCmdLine.Combo = it->second;
|
||||||
|
|
||||||
// Activate the key definer text
|
// Activate the key definer text
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
||||||
if (pVT != NULL) pVT->setActive(true);
|
if (pVT != NULL) pVT->setActive(true);
|
||||||
// setup the text of the key
|
// setup the text of the key
|
||||||
pVT->setText(it->second.toUCString());
|
pVT->setText(it->second.toUCString());
|
||||||
|
|
||||||
// There is already a shortcut so we can display ok button
|
// There is already a shortcut so we can display ok button
|
||||||
pBut = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
pBut = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pBut != NULL) pBut->setFrozen (false);
|
if (pBut != NULL) pBut->setFrozen (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -770,20 +770,20 @@ void CModalContainerEditCmd::invalidCurrentCommand()
|
||||||
if (CurrentEditCmdNb == -1)
|
if (CurrentEditCmdNb == -1)
|
||||||
{
|
{
|
||||||
// Dont display key shortcut if we are in creation mode
|
// Dont display key shortcut if we are in creation mode
|
||||||
pVT= dynamic_cast<CViewText*>(pIM->getElementFromId( WinName+VIEW_EDITCMD_TEXT_KEY ));
|
pVT= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId( WinName+VIEW_EDITCMD_TEXT_KEY ));
|
||||||
if (pVT != NULL) pVT->setText(CI18N::get(VIEW_EDITCMD_TEXT_KEY_DEFAULT));
|
if (pVT != NULL) pVT->setText(CI18N::get(VIEW_EDITCMD_TEXT_KEY_DEFAULT));
|
||||||
|
|
||||||
// Deactivate the key definer text
|
// Deactivate the key definer text
|
||||||
pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
||||||
if (pVT != NULL) pVT->setActive(false);
|
if (pVT != NULL) pVT->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deactivate the key definer button
|
// Deactivate the key definer button
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
||||||
if (pCB != NULL) pCB->setActive(false);
|
if (pCB != NULL) pCB->setActive(false);
|
||||||
|
|
||||||
// Deactivate ok button
|
// Deactivate ok button
|
||||||
pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen (true);
|
if (pCB != NULL) pCB->setFrozen (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,7 +853,7 @@ void CModalContainerEditCmd::validCurrentCommand()
|
||||||
string sWin;
|
string sWin;
|
||||||
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
||||||
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
||||||
CGroupEditBox *pEB= dynamic_cast<CGroupEditBox*>(pIM->getElementFromId( sWin ));
|
CGroupEditBox *pEB= dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId( sWin ));
|
||||||
// convert to utf8
|
// convert to utf8
|
||||||
if (pEB != NULL)
|
if (pEB != NULL)
|
||||||
CurrentEditCmdLine.ActionName.Argu += pEB->getInputStringAsUtf8();
|
CurrentEditCmdLine.ActionName.Argu += pEB->getInputStringAsUtf8();
|
||||||
|
@ -868,10 +868,10 @@ void CModalContainerEditCmd::validCurrentCommand()
|
||||||
if (CurrentEditCmdNb == -1)
|
if (CurrentEditCmdNb == -1)
|
||||||
{
|
{
|
||||||
// Activate the key definer button
|
// Activate the key definer button
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_KEY));
|
||||||
if (pCB != NULL) pCB->setActive(true);
|
if (pCB != NULL) pCB->setActive(true);
|
||||||
// Activate the key definer text
|
// Activate the key definer text
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_TEXT_KEY));
|
||||||
if (pVT != NULL) pVT->setActive(true);
|
if (pVT != NULL) pVT->setActive(true);
|
||||||
// Does the command already exists ?
|
// Does the command already exists ?
|
||||||
const CActionsManager::TActionComboMap &actionCombo = pAM->getActionComboMap();
|
const CActionsManager::TActionComboMap &actionCombo = pAM->getActionComboMap();
|
||||||
|
@ -882,7 +882,7 @@ void CModalContainerEditCmd::validCurrentCommand()
|
||||||
// Yes ok let setup the text of the key
|
// Yes ok let setup the text of the key
|
||||||
pVT->setText(it->second.toUCString());
|
pVT->setText(it->second.toUCString());
|
||||||
// There is already a shortcut so we can display ok button
|
// There is already a shortcut so we can display ok button
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen (false);
|
if (pCB != NULL) pCB->setFrozen (false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -892,13 +892,13 @@ void CModalContainerEditCmd::validCurrentCommand()
|
||||||
// Display not assigned text
|
// Display not assigned text
|
||||||
pVT->setText(CI18N::get(VIEW_EDITCMD_TEXT_KEY_DEFAULT));
|
pVT->setText(CI18N::get(VIEW_EDITCMD_TEXT_KEY_DEFAULT));
|
||||||
// Do not display the ok button
|
// Do not display the ok button
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen (true);
|
if (pCB != NULL) pCB->setFrozen (true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen (false);
|
if (pCB != NULL) pCB->setFrozen (false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -906,7 +906,7 @@ void CModalContainerEditCmd::validCurrentCommand()
|
||||||
// If we are in mode new command (from macro) just turn on the ok button
|
// If we are in mode new command (from macro) just turn on the ok button
|
||||||
if (WinName == "ui:interface:editcmd")
|
if (WinName == "ui:interface:editcmd")
|
||||||
{
|
{
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen(false);
|
if (pCB != NULL) pCB->setFrozen(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -932,8 +932,8 @@ bool CModalContainerEditCmd::isParamValid (sint32 nParamIndex)
|
||||||
else if (paramType == 1)
|
else if (paramType == 1)
|
||||||
{
|
{
|
||||||
CGroupEditBox *pEB;
|
CGroupEditBox *pEB;
|
||||||
if (nParamIndex == 0) pEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId( WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX ));
|
if (nParamIndex == 0) pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId( WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX ));
|
||||||
else pEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId( WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX ));
|
else pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId( WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX ));
|
||||||
if (pEB == NULL) return false;
|
if (pEB == NULL) return false;
|
||||||
|
|
||||||
// no need to translate utf8 or not here
|
// no need to translate utf8 or not here
|
||||||
|
@ -1008,7 +1008,7 @@ void CModalContainerEditCmd::onChangeCategory()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Update the combo box of actions
|
// Update the combo box of actions
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( WinName+WIN_EDITCMD_COMBO_ACTION ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( WinName+WIN_EDITCMD_COMBO_ACTION ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -1040,9 +1040,9 @@ void CModalContainerEditCmd::onChangeCategory()
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( DbComboDisp2P )->setValue32(-1);
|
||||||
// reset name of params
|
// reset name of params
|
||||||
CViewText *pViewParamName;
|
CViewText *pViewParamName;
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
// Reset key
|
// Reset key
|
||||||
invalidCurrentCommand();
|
invalidCurrentCommand();
|
||||||
|
@ -1078,9 +1078,9 @@ void CModalContainerEditCmd::onChangeAction()
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->setValue32(-1);
|
NLGUI::CDBManager::getInstance()->getDbProp( DbComboSel2P )->setValue32(-1);
|
||||||
// reset name of params
|
// reset name of params
|
||||||
CViewText *pViewParamName;
|
CViewText *pViewParamName;
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_FIRST_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(WinName+VIEW_EDITCMD_SECOND_PARAM_NAME));
|
||||||
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
if (pViewParamName != NULL) pViewParamName->setText (string(""));
|
||||||
|
|
||||||
uint noParam = 0;
|
uint noParam = 0;
|
||||||
|
@ -1102,7 +1102,7 @@ void CModalContainerEditCmd::onChangeAction()
|
||||||
if (noParam == 0) sViewText = WinName+VIEW_EDITCMD_FIRST_PARAM_NAME;
|
if (noParam == 0) sViewText = WinName+VIEW_EDITCMD_FIRST_PARAM_NAME;
|
||||||
else sViewText = WinName+VIEW_EDITCMD_SECOND_PARAM_NAME;
|
else sViewText = WinName+VIEW_EDITCMD_SECOND_PARAM_NAME;
|
||||||
|
|
||||||
pViewParamName = dynamic_cast<CViewText*>(pIM->getElementFromId(sViewText));
|
pViewParamName = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(sViewText));
|
||||||
if (pViewParamName != NULL)
|
if (pViewParamName != NULL)
|
||||||
pViewParamName->setText (CI18N::get(rP.LocalizedName));
|
pViewParamName->setText (CI18N::get(rP.LocalizedName));
|
||||||
}
|
}
|
||||||
|
@ -1112,7 +1112,7 @@ void CModalContainerEditCmd::onChangeAction()
|
||||||
string sWin;
|
string sWin;
|
||||||
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_LIST;
|
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_LIST;
|
||||||
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_LIST;
|
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_LIST;
|
||||||
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId( sWin ));
|
CDBGroupComboBox *pCB= dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( sWin ));
|
||||||
if( pCB )
|
if( pCB )
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -1138,7 +1138,7 @@ void CModalContainerEditCmd::onChangeAction()
|
||||||
string sWin;
|
string sWin;
|
||||||
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
if (noParam == 0) sWin = WinName+WIN_EDITCMD_COMBO_FIRST_PARAM_EDITBOX;
|
||||||
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
else sWin = WinName+WIN_EDITCMD_COMBO_SECOND_PARAM_EDITBOX;
|
||||||
CGroupEditBox *pEB= dynamic_cast<CGroupEditBox*>(pIM->getElementFromId( sWin ));
|
CGroupEditBox *pEB= dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId( sWin ));
|
||||||
if( pEB )
|
if( pEB )
|
||||||
{
|
{
|
||||||
pEB->setInputString(ucstring(""));
|
pEB->setInputString(ucstring(""));
|
||||||
|
@ -1270,9 +1270,9 @@ public:
|
||||||
{
|
{
|
||||||
//checkCurrentCommandValidity();
|
//checkCurrentCommandValidity();
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(pIM->getElementFromId(WIN_MODAL_GET_KEY));
|
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(CWidgetManager::getInstance()->getElementFromId(WIN_MODAL_GET_KEY));
|
||||||
pGetKey->Caller = Params;
|
pGetKey->Caller = Params;
|
||||||
pIM->enableModalWindow(pCaller, WIN_MODAL_GET_KEY);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, WIN_MODAL_GET_KEY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerEditCmdDefineKey, "editcmd_cmd_def_key");
|
REGISTER_ACTION_HANDLER( CHandlerEditCmdDefineKey, "editcmd_cmd_def_key");
|
||||||
|
@ -1326,8 +1326,8 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(pIM->getElementFromId(WIN_MODAL_GET_KEY));
|
CGroupModalGetKey*pGetKey = dynamic_cast<CGroupModalGetKey*>(CWidgetManager::getInstance()->getElementFromId(WIN_MODAL_GET_KEY));
|
||||||
if (pGetKey == NULL)
|
if (pGetKey == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1346,10 +1346,10 @@ public:
|
||||||
{
|
{
|
||||||
pMCM->NewKey->CurrentEditCmdLine.Combo = pGetKey->Combo;
|
pMCM->NewKey->CurrentEditCmdLine.Combo = pGetKey->Combo;
|
||||||
|
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(pMCM->NewKey->WinName+VIEW_EDITCMD_TEXT_KEY));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(pMCM->NewKey->WinName+VIEW_EDITCMD_TEXT_KEY));
|
||||||
if (pVT != NULL) pVT->setText(pMCM->NewKey->CurrentEditCmdLine.Combo.toUCString());
|
if (pVT != NULL) pVT->setText(pMCM->NewKey->CurrentEditCmdLine.Combo.toUCString());
|
||||||
|
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(pMCM->NewKey->WinName+CTRL_EDITCMD_BUTTON_OK));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(pMCM->NewKey->WinName+CTRL_EDITCMD_BUTTON_OK));
|
||||||
if (pCB != NULL) pCB->setFrozen (false);
|
if (pCB != NULL) pCB->setFrozen (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1358,7 +1358,7 @@ public:
|
||||||
{
|
{
|
||||||
pMCM->EditCmd->CurrentEditCmdLine.Combo = pGetKey->Combo;
|
pMCM->EditCmd->CurrentEditCmdLine.Combo = pGetKey->Combo;
|
||||||
pMCM->CurrentEditMacro.Combo = pMCM->EditCmd->CurrentEditCmdLine.Combo;
|
pMCM->CurrentEditMacro.Combo = pMCM->EditCmd->CurrentEditCmdLine.Combo;
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_NEWMACRO_KEY));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_NEWMACRO_KEY));
|
||||||
if (pVT != NULL) pVT->setText(pMCM->EditCmd->CurrentEditCmdLine.Combo.toUCString());
|
if (pVT != NULL) pVT->setText(pMCM->EditCmd->CurrentEditCmdLine.Combo.toUCString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -580,7 +580,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string sTP = getParam(Params, "target");
|
string sTP = getParam(Params, "target");
|
||||||
if (sTP.empty()) return;
|
if (sTP.empty()) return;
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sTP));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sTP));
|
||||||
sint32 nb;
|
sint32 nb;
|
||||||
fromString(getParam(Params, "value"), nb);
|
fromString(getParam(Params, "value"), nb);
|
||||||
if (pCS != NULL) pCS->setMacroBack((uint8)nb);
|
if (pCS != NULL) pCS->setMacroBack((uint8)nb);
|
||||||
|
@ -597,7 +597,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string sTP = getParam(Params, "target");
|
string sTP = getParam(Params, "target");
|
||||||
if (sTP.empty()) return;
|
if (sTP.empty()) return;
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sTP));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sTP));
|
||||||
sint32 nb;
|
sint32 nb;
|
||||||
fromString(getParam(Params, "value"), nb);
|
fromString(getParam(Params, "value"), nb);
|
||||||
if (pCS != NULL) pCS->setMacroIcon((uint8)nb);
|
if (pCS != NULL) pCS->setMacroIcon((uint8)nb);
|
||||||
|
@ -614,7 +614,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string sTP = getParam(Params, "target");
|
string sTP = getParam(Params, "target");
|
||||||
if (sTP.empty()) return;
|
if (sTP.empty()) return;
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(sTP));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sTP));
|
||||||
sint32 nb;
|
sint32 nb;
|
||||||
fromString(getParam(Params, "value"), nb);
|
fromString(getParam(Params, "value"), nb);
|
||||||
if (pCS != NULL) pCS->setMacroOver((uint8)nb);
|
if (pCS != NULL) pCS->setMacroOver((uint8)nb);
|
||||||
|
@ -632,7 +632,7 @@ public:
|
||||||
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pCaller);
|
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pCaller);
|
||||||
if (pEB == NULL) return;
|
if (pEB == NULL) return;
|
||||||
|
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(Params));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(Params));
|
||||||
if (pCS == NULL) return;
|
if (pCS == NULL) return;
|
||||||
pCS->setMacroText(pEB->getInputStringAsStdString());
|
pCS->setMacroText(pEB->getInputStringAsStdString());
|
||||||
}
|
}
|
||||||
|
@ -649,13 +649,13 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
|
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_MACROICONCREATION_ICON));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_ICON));
|
||||||
if (pCS != NULL) pCS->writeToMacro(pMCM->CurrentEditMacro);
|
if (pCS != NULL) pCS->writeToMacro(pMCM->CurrentEditMacro);
|
||||||
|
|
||||||
pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_NEWMACRO_ICON));
|
pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_NEWMACRO_ICON));
|
||||||
if (pCS != NULL) pCS->readFromMacro(pMCM->CurrentEditMacro);
|
if (pCS != NULL) pCS->readFromMacro(pMCM->CurrentEditMacro);
|
||||||
|
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerMacroIconCreation, "macro_icon_creation_ok");
|
REGISTER_ACTION_HANDLER( CHandlerMacroIconCreation, "macro_icon_creation_ok");
|
||||||
|
@ -678,7 +678,7 @@ public:
|
||||||
if (back != 0xff)
|
if (back != 0xff)
|
||||||
{
|
{
|
||||||
string sButton = string(GROUP_MACROICONCREATION_BACK) + CTRL_MACROICONCREATION_BUTTON + toString(back+1);
|
string sButton = string(GROUP_MACROICONCREATION_BACK) + CTRL_MACROICONCREATION_BUTTON + toString(back+1);
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(sButton));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(sButton));
|
||||||
if (pCB != NULL) pCB->setPushed(true);
|
if (pCB != NULL) pCB->setPushed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ public:
|
||||||
if (icon != 0xff)
|
if (icon != 0xff)
|
||||||
{
|
{
|
||||||
string sButton = string(GROUP_MACROICONCREATION_ICON) + CTRL_MACROICONCREATION_BUTTON + toString(icon+1);
|
string sButton = string(GROUP_MACROICONCREATION_ICON) + CTRL_MACROICONCREATION_BUTTON + toString(icon+1);
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(sButton));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(sButton));
|
||||||
if (pCB != NULL) pCB->setPushed(true);
|
if (pCB != NULL) pCB->setPushed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,15 +694,15 @@ public:
|
||||||
if (over != 0xff)
|
if (over != 0xff)
|
||||||
{
|
{
|
||||||
string sButton = string(GROUP_MACROICONCREATION_OVER) + CTRL_MACROICONCREATION_BUTTON + toString(over+1);
|
string sButton = string(GROUP_MACROICONCREATION_OVER) + CTRL_MACROICONCREATION_BUTTON + toString(over+1);
|
||||||
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(pIM->getElementFromId(sButton));
|
CCtrlBaseButton *pCB = dynamic_cast<CCtrlBaseButton*>(CWidgetManager::getInstance()->getElementFromId(sButton));
|
||||||
if (pCB != NULL) pCB->setPushed(true);
|
if (pCB != NULL) pCB->setPushed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_MACROICONCREATION_EDITTEXT));
|
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_EDITTEXT));
|
||||||
if (pEB != NULL)
|
if (pEB != NULL)
|
||||||
{
|
{
|
||||||
pEB->setInputStringAsStdString(pMCM->CurrentEditMacro.DispText);
|
pEB->setInputStringAsStdString(pMCM->CurrentEditMacro.DispText);
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_MACROICONCREATION_ICON));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_MACROICONCREATION_ICON));
|
||||||
if (pCS != NULL)
|
if (pCS != NULL)
|
||||||
pCS->setMacroText(pEB->getInputStringAsStdString());
|
pCS->setMacroText(pEB->getInputStringAsStdString());
|
||||||
}
|
}
|
||||||
|
@ -836,7 +836,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
if (pCaller == NULL)
|
if (pCaller == NULL)
|
||||||
pCaller = dynamic_cast<CCtrlBase*>(pIM->getElementFromId("ui:interface:new_macro:content:edit_name"));
|
pCaller = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:new_macro:content:edit_name"));
|
||||||
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pCaller);
|
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pCaller);
|
||||||
if (pEB == NULL) return;
|
if (pEB == NULL) return;
|
||||||
|
|
||||||
|
@ -861,16 +861,16 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
// Icon
|
// Icon
|
||||||
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(CTRL_NEWMACRO_ICON));
|
CDBCtrlSheet *pCS = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(CTRL_NEWMACRO_ICON));
|
||||||
if (pCS != NULL) pCS->readFromMacro(pMCM->CurrentEditMacro);
|
if (pCS != NULL) pCS->readFromMacro(pMCM->CurrentEditMacro);
|
||||||
// Name
|
// Name
|
||||||
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(GROUP_NEWMACRO_EDIT_NAME));
|
CGroupEditBox *pEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(GROUP_NEWMACRO_EDIT_NAME));
|
||||||
if (pEB != NULL) pEB->setInputString(pMCM->CurrentEditMacro.Name);
|
if (pEB != NULL) pEB->setInputString(pMCM->CurrentEditMacro.Name);
|
||||||
// Commands
|
// Commands
|
||||||
CGroupList *pList = dynamic_cast<CGroupList*>(pIM->getElementFromId(GROUP_NEWMACRO_COMMANDS));
|
CGroupList *pList = dynamic_cast<CGroupList*>(CWidgetManager::getInstance()->getElementFromId(GROUP_NEWMACRO_COMMANDS));
|
||||||
if (pList == NULL) return;
|
if (pList == NULL) return;
|
||||||
// Key Shortcut
|
// Key Shortcut
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_NEWMACRO_KEY));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_NEWMACRO_KEY));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
if (pMCM->CurrentEditMacro.Combo.Key == KeyCount)
|
if (pMCM->CurrentEditMacro.Combo.Key == KeyCount)
|
||||||
|
@ -936,7 +936,7 @@ public:
|
||||||
pMCM->addMacro(pMCM->CurrentEditMacro);
|
pMCM->addMacro(pMCM->CurrentEditMacro);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_NEWMACRO));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_NEWMACRO));
|
||||||
if (pGC != NULL) pGC->setActive (false);
|
if (pGC != NULL) pGC->setActive (false);
|
||||||
|
|
||||||
pIM->runActionHandler("macros_open",NULL);
|
pIM->runActionHandler("macros_open",NULL);
|
||||||
|
@ -1001,7 +1001,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
|
|
||||||
CGroupList *pList = dynamic_cast<CGroupList*>(pIM->getElementFromId(WIN_MACRO_CONTENT));
|
CGroupList *pList = dynamic_cast<CGroupList*>(CWidgetManager::getInstance()->getElementFromId(WIN_MACRO_CONTENT));
|
||||||
if (pList == NULL) return;
|
if (pList == NULL) return;
|
||||||
|
|
||||||
pList->clearGroups();
|
pList->clearGroups();
|
||||||
|
@ -1037,7 +1037,7 @@ public:
|
||||||
mc.BitmapOver = 0;
|
mc.BitmapOver = 0;
|
||||||
pMCM->CurrentEditMacro = mc;
|
pMCM->CurrentEditMacro = mc;
|
||||||
|
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_NEWMACRO));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_NEWMACRO));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
{
|
{
|
||||||
pGC->setTitle(NEWMACRO_TITLE_NEW);
|
pGC->setTitle(NEWMACRO_TITLE_NEW);
|
||||||
|
@ -1077,7 +1077,7 @@ public:
|
||||||
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
|
||||||
pMCM->CurrentEditMacro = pMCM->getMacros()[nMacNb];
|
pMCM->CurrentEditMacro = pMCM->getMacros()[nMacNb];
|
||||||
pMCM->CurrentEditMacroNb = nMacNb;
|
pMCM->CurrentEditMacroNb = nMacNb;
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId(WIN_NEWMACRO));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_NEWMACRO));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
{
|
{
|
||||||
pGC->setTitle(NEWMACRO_TITLE_EDIT);
|
pGC->setTitle(NEWMACRO_TITLE_EDIT);
|
||||||
|
|
|
@ -81,7 +81,7 @@ void CMusicPlayer::play ()
|
||||||
|
|
||||||
/* Show the song title */
|
/* Show the song title */
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:mp3_player:screen:text"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:mp3_player:screen:text"));
|
||||||
if (pVT)
|
if (pVT)
|
||||||
pVT->setText (_Songs[_CurrentSong].Title);
|
pVT->setText (_Songs[_CurrentSong].Title);
|
||||||
}
|
}
|
||||||
|
|
|
@ -511,12 +511,12 @@ void CHugeListObs::updateUIItemPage(uint index)
|
||||||
if (BotChatPageAll->Trade->getBuyOnly())
|
if (BotChatPageAll->Trade->getBuyOnly())
|
||||||
{
|
{
|
||||||
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":";
|
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":";
|
||||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_MONEY_BUY_ONLY));
|
listSheet = dynamic_cast<CDBGroupListSheetText *>(CWidgetManager::getInstance()->getElementFromId(UI_LIST_OF_ITEMS_FOR_MONEY_BUY_ONLY));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":";
|
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MONEY ":";
|
||||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_MONEY));
|
listSheet = dynamic_cast<CDBGroupListSheetText *>(CWidgetManager::getInstance()->getElementFromId(UI_LIST_OF_ITEMS_FOR_MONEY));
|
||||||
}
|
}
|
||||||
if (!listSheet) return;
|
if (!listSheet) return;
|
||||||
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_TO_BUY", false);
|
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_TO_BUY", false);
|
||||||
|
@ -525,32 +525,32 @@ void CHugeListObs::updateUIItemPage(uint index)
|
||||||
case ItemForMissions:
|
case ItemForMissions:
|
||||||
{
|
{
|
||||||
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":";
|
dbPath = DB_LOCAL_BRANCH_FOR_ITEM_FOR_MISSION ":";
|
||||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_MISSION));
|
listSheet = dynamic_cast<CDBGroupListSheetText *>(CWidgetManager::getInstance()->getElementFromId(UI_LIST_OF_ITEMS_FOR_MISSION));
|
||||||
if (!listSheet) return;
|
if (!listSheet) return;
|
||||||
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_FOR_MISSION", false);
|
itemListCategoryLeaf = NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:TYPE_OF_ITEMS_FOR_MISSION", false);
|
||||||
if (!itemListCategoryLeaf) return;
|
if (!itemListCategoryLeaf) return;
|
||||||
// display the group for mission items
|
// display the group for mission items
|
||||||
CInterfaceElement *elm = im->getElementFromId(UI_GROUP_OF_ITEMS_FOR_MISSION);
|
CInterfaceElement *elm = CWidgetManager::getInstance()->getElementFromId(UI_GROUP_OF_ITEMS_FOR_MISSION);
|
||||||
if (elm) elm->setActive(true);
|
if (elm) elm->setActive(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Ascensor:
|
case Ascensor:
|
||||||
{
|
{
|
||||||
dbPath = DB_LOCAL_BRANCH_FOR_ASCENSOR ":";
|
dbPath = DB_LOCAL_BRANCH_FOR_ASCENSOR ":";
|
||||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_ITEMS_FOR_ASCENSOR));
|
listSheet = dynamic_cast<CDBGroupListSheetText *>(CWidgetManager::getInstance()->getElementFromId(UI_LIST_OF_ITEMS_FOR_ASCENSOR));
|
||||||
if (!listSheet) return;
|
if (!listSheet) return;
|
||||||
// display the group for mission items
|
// display the group for mission items
|
||||||
CInterfaceElement *elm = im->getElementFromId(UI_GROUP_OF_ITEMS_FOR_ASCENSOR);
|
CInterfaceElement *elm = CWidgetManager::getInstance()->getElementFromId(UI_GROUP_OF_ITEMS_FOR_ASCENSOR);
|
||||||
if (elm) elm->setActive(true);
|
if (elm) elm->setActive(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Missions:
|
case Missions:
|
||||||
{
|
{
|
||||||
dbPath = DB_LOCAL_BRANCH_FOR_MISSIONS ":";
|
dbPath = DB_LOCAL_BRANCH_FOR_MISSIONS ":";
|
||||||
listSheet = dynamic_cast<CDBGroupListSheetText *>(im->getElementFromId(UI_LIST_OF_MISSIONS));
|
listSheet = dynamic_cast<CDBGroupListSheetText *>(CWidgetManager::getInstance()->getElementFromId(UI_LIST_OF_MISSIONS));
|
||||||
if (!listSheet) return;
|
if (!listSheet) return;
|
||||||
// display the group for mission items
|
// display the group for mission items
|
||||||
CInterfaceElement *elm = im->getElementFromId(UI_GROUP_OF_MISSIONS);
|
CInterfaceElement *elm = CWidgetManager::getInstance()->getElementFromId(UI_GROUP_OF_MISSIONS);
|
||||||
if (elm) elm->setActive(true);
|
if (elm) elm->setActive(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1087,7 +1087,7 @@ bool CPeopleInterraction::getPeopleFromCurrentMenu(CPeopleList *&peopleList, uin
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
// the group that launched the modal window (the menu) must be the header of the group container that represent a people entry
|
// the group that launched the modal window (the menu) must be the header of the group container that represent a people entry
|
||||||
CInterfaceGroup *header = dynamic_cast<CInterfaceGroup *>(im->getCtrlLaunchingModal());
|
CInterfaceGroup *header = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (!header) return false;
|
if (!header) return false;
|
||||||
// get the parent container
|
// get the parent container
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(header->getParent());
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(header->getParent());
|
||||||
|
@ -1100,7 +1100,7 @@ CPeopleList *CPeopleInterraction::getPeopleListFromCurrentMenu()
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
// the group that launched the modal window (the menu) must be the header of the group container that represent a people entry
|
// the group that launched the modal window (the menu) must be the header of the group container that represent a people entry
|
||||||
CInterfaceGroup *header = dynamic_cast<CInterfaceGroup *>(im->getCtrlLaunchingModal());
|
CInterfaceGroup *header = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (!header) return NULL;
|
if (!header) return NULL;
|
||||||
// get the parent container
|
// get the parent container
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(header->getParent());
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(header->getParent());
|
||||||
|
@ -2230,7 +2230,7 @@ public:
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
string groupName= getParam(sParams, "group");
|
string groupName= getParam(sParams, "group");
|
||||||
CInterfaceGroup *gc = dynamic_cast<CInterfaceGroup *>(pIM->getElementFromId(groupName));
|
CInterfaceGroup *gc = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(groupName));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
CGroupEditBox *geb = dynamic_cast<CGroupEditBox *>(gc->getGroup("add_contact_eb:eb"));
|
CGroupEditBox *geb = dynamic_cast<CGroupEditBox *>(gc->getGroup("add_contact_eb:eb"));
|
||||||
|
@ -2416,9 +2416,9 @@ public:
|
||||||
nlwarning("Deactivated for now!");
|
nlwarning("Deactivated for now!");
|
||||||
return;
|
return;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(NEW_PARTY_CHAT_WINDOW));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(NEW_PARTY_CHAT_WINDOW));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
// Set the keyboard focus
|
// Set the keyboard focus
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
||||||
if (eb)
|
if (eb)
|
||||||
|
@ -2447,7 +2447,7 @@ class CHandlerValidatePartyChatName : public IActionHandler
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId(NEW_PARTY_CHAT_WINDOW));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(NEW_PARTY_CHAT_WINDOW));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
CGroupEditBox *eb = dynamic_cast<CGroupEditBox *>(gc->getGroup("eb"));
|
||||||
if (!eb) return;
|
if (!eb) return;
|
||||||
|
@ -2484,7 +2484,7 @@ class CHandlerRemovePartyChat : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
if (chat) PeopleInterraction.removePartyChat(chat);
|
if (chat) PeopleInterraction.removePartyChat(chat);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2523,7 +2523,7 @@ class CHandlerAddAllTeamMembersToPartyChat : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
// TODO GAMEDEV : add all team members
|
// TODO GAMEDEV : add all team members
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2536,7 +2536,7 @@ class CHandlerRemoveAllTeamMembersToPartyChat : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
// TODO GAMEDEV : remove all team members
|
// TODO GAMEDEV : remove all team members
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2549,7 +2549,7 @@ class CHandlerAddAllGuildMembersToPartyChat : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
// TODO GAMEDEV : add all guild members
|
// TODO GAMEDEV : add all guild members
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2562,7 +2562,7 @@ class CHandlerRemoveAllGuildMembersToPartyChat : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CInterfaceManager::getInstance()->getCtrlLaunchingModal());
|
// CChatWindow *chat = getChatWndMgr().getChatWindowFromCaller(CWidgetManager::getInstance()->getCtrlLaunchingModal());
|
||||||
// TODO_GAMEDEV : remove all guild members
|
// TODO_GAMEDEV : remove all guild members
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2594,7 +2594,7 @@ public:
|
||||||
partyChats = nlstricmp("true", strPartyChats.c_str()) == 0;
|
partyChats = nlstricmp("true", strPartyChats.c_str()) == 0;
|
||||||
}
|
}
|
||||||
// get the menu
|
// get the menu
|
||||||
CGroupMenu *menu = dynamic_cast<CGroupMenu *>(im->getElementFromId(menuName));
|
CGroupMenu *menu = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(menuName));
|
||||||
if (!menu) return;
|
if (!menu) return;
|
||||||
// remove all party chat from the previous list
|
// remove all party chat from the previous list
|
||||||
uint lastTargetSelectedIndex = 0;
|
uint lastTargetSelectedIndex = 0;
|
||||||
|
@ -2639,7 +2639,7 @@ public:
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
cw = PeopleInterraction.TheUserChat.Window;
|
cw = PeopleInterraction.TheUserChat.Window;
|
||||||
// CChatStdInput &ci = PeopleInterraction.ChatInput;
|
// CChatStdInput &ci = PeopleInterraction.ChatInput;
|
||||||
CGroupMenu *pMenu = dynamic_cast<CGroupMenu*>(pIM->getElementFromId("ui:interface:user_chat_target_menu"));
|
CGroupMenu *pMenu = dynamic_cast<CGroupMenu*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:user_chat_target_menu"));
|
||||||
CViewTextMenu *pMenuAround = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:around"));
|
CViewTextMenu *pMenuAround = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:around"));
|
||||||
CViewTextMenu *pMenuRegion = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:region"));
|
CViewTextMenu *pMenuRegion = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:region"));
|
||||||
CViewTextMenu *pMenuUniverse = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:universe"));
|
CViewTextMenu *pMenuUniverse = dynamic_cast<CViewTextMenu*>(pMenu->getElement("ui:interface:user_chat_target_menu:universe"));
|
||||||
|
@ -2681,7 +2681,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// activate the menu
|
// activate the menu
|
||||||
CInterfaceManager::getInstance()->enableModalWindow(pCaller, menuName);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, menuName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER( CHandlerSelectChatTarget, "select_chat_target");
|
REGISTER_ACTION_HANDLER( CHandlerSelectChatTarget, "select_chat_target");
|
||||||
|
@ -2844,13 +2844,13 @@ class CHandlerSelectChatSource : public IActionHandler
|
||||||
if (cw == pi.ChatGroup.Window)
|
if (cw == pi.ChatGroup.Window)
|
||||||
{
|
{
|
||||||
// select main chat menu
|
// select main chat menu
|
||||||
menu = dynamic_cast<CGroupMenu *>(im->getElementFromId(MAIN_CHAT_SOURCE_MENU));
|
menu = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(MAIN_CHAT_SOURCE_MENU));
|
||||||
|
|
||||||
// Remove all unused dynamic channels and set the names
|
// Remove all unused dynamic channels and set the names
|
||||||
for (uint i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
for (uint i = 0; i < CChatGroup::MaxDynChanPerPlayer; i++)
|
||||||
{
|
{
|
||||||
string s = toString(i);
|
string s = toString(i);
|
||||||
CViewTextMenu *pVTM = dynamic_cast<CViewTextMenu *>(im->getElementFromId(MAIN_CHAT_SOURCE_MENU+":tab:dyn"+s));
|
CViewTextMenu *pVTM = dynamic_cast<CViewTextMenu *>(CWidgetManager::getInstance()->getElementFromId(MAIN_CHAT_SOURCE_MENU+":tab:dyn"+s));
|
||||||
if (pVTM)
|
if (pVTM)
|
||||||
{
|
{
|
||||||
uint32 textId = ChatMngr.getDynamicChannelNameFromDbIndex(i);
|
uint32 textId = ChatMngr.getDynamicChannelNameFromDbIndex(i);
|
||||||
|
@ -2885,7 +2885,7 @@ class CHandlerSelectChatSource : public IActionHandler
|
||||||
if (cw == pi.TheUserChat.Window)
|
if (cw == pi.TheUserChat.Window)
|
||||||
{
|
{
|
||||||
// select user chat menu
|
// select user chat menu
|
||||||
menu = dynamic_cast<CGroupMenu *>(im->getElementFromId(USER_CHAT_SOURCE_MENU));
|
menu = dynamic_cast<CGroupMenu *>(CWidgetManager::getInstance()->getElementFromId(USER_CHAT_SOURCE_MENU));
|
||||||
addUserChatEntries= true;
|
addUserChatEntries= true;
|
||||||
}
|
}
|
||||||
// Simple menu
|
// Simple menu
|
||||||
|
@ -2895,7 +2895,7 @@ class CHandlerSelectChatSource : public IActionHandler
|
||||||
// Just open the STD chat menu, and quit
|
// Just open the STD chat menu, and quit
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||||
CInterfaceManager::getInstance()->enableModalWindow(pCaller, STD_CHAT_SOURCE_MENU);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, STD_CHAT_SOURCE_MENU);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2997,7 +2997,7 @@ class CHandlerSelectChatSource : public IActionHandler
|
||||||
// *** active the menu
|
// *** active the menu
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_POPUP")->setValue64(cw->getContainer()->isPopuped() || cw->getContainer()->getLayerSetup() == 0 ? 1 : 0);
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:GC_HAS_HELP")->setValue64(!cw->getContainer()->getHelpPage().empty());
|
||||||
im->enableModalWindow(pCaller, menu);
|
CWidgetManager::getInstance()->enableModalWindow(pCaller, menu);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER(CHandlerSelectChatSource, "select_chat_source");
|
REGISTER_ACTION_HANDLER(CHandlerSelectChatSource, "select_chat_source");
|
||||||
|
@ -3116,7 +3116,7 @@ class CHandlerToggleChatEBVis : public IActionHandler
|
||||||
{
|
{
|
||||||
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
void execute (CCtrlBase * /* pCaller */, const std::string &/* sParams */)
|
||||||
{
|
{
|
||||||
CCtrlBase *clm = CInterfaceManager::getInstance()->getCtrlLaunchingModal();
|
CCtrlBase *clm = CWidgetManager::getInstance()->getCtrlLaunchingModal();
|
||||||
if (!clm) return;
|
if (!clm) return;
|
||||||
CInterfaceGroup *ig = clm->getParent();
|
CInterfaceGroup *ig = clm->getParent();
|
||||||
do
|
do
|
||||||
|
|
|
@ -63,7 +63,7 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha
|
||||||
CGroupContainer *fatherContainer = NULL;
|
CGroupContainer *fatherContainer = NULL;
|
||||||
if (!desc.FatherContainer.empty())
|
if (!desc.FatherContainer.empty())
|
||||||
{
|
{
|
||||||
fatherContainer = dynamic_cast<CGroupContainer *>(im->getElementFromId(desc.FatherContainer));
|
fatherContainer = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(desc.FatherContainer));
|
||||||
if (!fatherContainer)
|
if (!fatherContainer)
|
||||||
{
|
{
|
||||||
nlwarning("<CPeopleList::create> Can't get father group, or bad type");
|
nlwarning("<CPeopleList::create> Can't get father group, or bad type");
|
||||||
|
@ -99,7 +99,7 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha
|
||||||
{
|
{
|
||||||
|
|
||||||
// Root container
|
// Root container
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", gc);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", gc);
|
||||||
gc->setParent(pRoot);
|
gc->setParent(pRoot);
|
||||||
pRoot->addGroup (gc);
|
pRoot->addGroup (gc);
|
||||||
|
@ -384,7 +384,7 @@ sint CPeopleList::addPeople(const ucstring &name, uint teamMateIndex /*= 0*/)
|
||||||
_BaseContainer->attachContainer(gc);
|
_BaseContainer->attachContainer(gc);
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
pRoot->addGroup (gc);
|
pRoot->addGroup (gc);
|
||||||
|
|
||||||
_Peoples.push_back(CPeople());
|
_Peoples.push_back(CPeople());
|
||||||
|
@ -416,7 +416,7 @@ void CPeopleList::removePeople(uint index)
|
||||||
_BaseContainer->detachContainer(_Peoples[index].Container);
|
_BaseContainer->detachContainer(_Peoples[index].Container);
|
||||||
}
|
}
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
|
|
||||||
pRoot->delGroup (_Peoples[index].Container);
|
pRoot->delGroup (_Peoples[index].Container);
|
||||||
_Peoples.erase(_Peoples.begin() + index);
|
_Peoples.erase(_Peoples.begin() + index);
|
||||||
|
@ -528,7 +528,7 @@ void CPeopleList::displayMessage(uint index, const ucstring &msg, NLMISC::CRGBA
|
||||||
|
|
||||||
gcChat->requireAttention();
|
gcChat->requireAttention();
|
||||||
|
|
||||||
CInterfaceManager::getInstance()->setTopWindow(gcChat);
|
CWidgetManager::getInstance()->setTopWindow(gcChat);
|
||||||
|
|
||||||
CGroupList *gl = dynamic_cast<CGroupList *>(gcChat->getGroup("text_list"));
|
CGroupList *gl = dynamic_cast<CGroupList *>(gcChat->getGroup("text_list"));
|
||||||
if (gl == NULL)
|
if (gl == NULL)
|
||||||
|
@ -582,7 +582,7 @@ void CPeopleList::reset()
|
||||||
else // detach from root
|
else // detach from root
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(im->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
pRoot->delGroup(_BaseContainer);
|
pRoot->delGroup(_BaseContainer);
|
||||||
}
|
}
|
||||||
_BaseContainer = "";
|
_BaseContainer = "";
|
||||||
|
|
|
@ -152,7 +152,7 @@ void CPlayerTrade::restoreItem(CDBCtrlSheet *exchangeSlot)
|
||||||
CDBCtrlSheet *CPlayerTrade::getExchangeItem(uint index)
|
CDBCtrlSheet *CPlayerTrade::getExchangeItem(uint index)
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
return dynamic_cast<CDBCtrlSheet *>(im->getElementFromId(NLMISC::toString("ui:interface:player_trade:header_opened:give:given_items:slot%d", (int) index)));
|
return dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getElementFromId(NLMISC::toString("ui:interface:player_trade:header_opened:give:given_items:slot%d", (int) index)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ class CPlayerTradeLeftClickOnSlotHandler : public IActionHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
im->pushModalWindow(pCaller, "ui:interface:exchange_choose_in_bag");
|
CWidgetManager::getInstance()->pushModalWindow(pCaller, "ui:interface:exchange_choose_in_bag");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
REGISTER_ACTION_HANDLER(CPlayerTradeLeftClickOnSlotHandler, "exchange_left_click_on_slot");
|
REGISTER_ACTION_HANDLER(CPlayerTradeLeftClickOnSlotHandler, "exchange_left_click_on_slot");
|
||||||
|
|
|
@ -1084,7 +1084,7 @@ public:
|
||||||
pSM->tryToUnblockTitleFromItems(false);
|
pSM->tryToUnblockTitleFromItems(false);
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(GROUP_TITLE_COMBO));
|
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(GROUP_TITLE_COMBO));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
{
|
{
|
||||||
pCB->resetTexts();
|
pCB->resetTexts();
|
||||||
|
@ -1116,7 +1116,7 @@ public:
|
||||||
uint8 nNewTitle = 0;
|
uint8 nNewTitle = 0;
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(pIM->getElementFromId(GROUP_TITLE_COMBO));
|
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(GROUP_TITLE_COMBO));
|
||||||
if (pCB == NULL) return;
|
if (pCB == NULL) return;
|
||||||
if ((pCB->getSelection() < 0) || (pCB->getSelection() >= (sint32)pSM->_UIUnblockedTitles.size())) return;
|
if ((pCB->getSelection() < 0) || (pCB->getSelection() >= (sint32)pSM->_UIUnblockedTitles.size())) return;
|
||||||
|
|
||||||
|
|
|
@ -1629,7 +1629,7 @@ float CSPhraseManager::getPhraseSumBrickProp(const CSPhraseCom &phrase, uint
|
||||||
{
|
{
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
uint32 weight = (uint32) NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")->getValue32() / 10; // weight must be in dg here
|
uint32 weight = (uint32) NLGUI::CDBManager::getInstance()->getDbProp("SERVER:USER:DEFAULT_WEIGHT_HANDS")->getValue32() / 10; // weight must be in dg here
|
||||||
CDBCtrlSheet *ctrlSheet = dynamic_cast<CDBCtrlSheet *>(im->getElementFromId("ui:interface:gestionsets:hands:handr"));
|
CDBCtrlSheet *ctrlSheet = dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:gestionsets:hands:handr"));
|
||||||
if (ctrlSheet)
|
if (ctrlSheet)
|
||||||
{
|
{
|
||||||
const CItemSheet *itemSheet = ctrlSheet->asItemSheet();
|
const CItemSheet *itemSheet = ctrlSheet->asItemSheet();
|
||||||
|
@ -1638,7 +1638,7 @@ float CSPhraseManager::getPhraseSumBrickProp(const CSPhraseCom &phrase, uint
|
||||||
weight = (uint32) ctrlSheet->getItemWeight();
|
weight = (uint32) ctrlSheet->getItemWeight();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctrlSheet = dynamic_cast<CDBCtrlSheet *>(im->getElementFromId("ui:interface:gestionsets:hands:handl"));
|
ctrlSheet = dynamic_cast<CDBCtrlSheet *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:gestionsets:hands:handl"));
|
||||||
if (ctrlSheet)
|
if (ctrlSheet)
|
||||||
{
|
{
|
||||||
const CItemSheet *itemSheet = ctrlSheet->asItemSheet();
|
const CItemSheet *itemSheet = ctrlSheet->asItemSheet();
|
||||||
|
@ -1838,12 +1838,12 @@ void CSPhraseManager::updateExecutionDisplay()
|
||||||
displayNext= false;
|
displayNext= false;
|
||||||
|
|
||||||
// DisplayCycleSelectionOnActionBar
|
// DisplayCycleSelectionOnActionBar
|
||||||
CInterfaceElement *viewCycle= pIM->getElementFromId(PhraseMemoryViewCycleAction);
|
CInterfaceElement *viewCycle= CWidgetManager::getInstance()->getElementFromId(PhraseMemoryViewCycleAction);
|
||||||
if(viewCycle)
|
if(viewCycle)
|
||||||
{
|
{
|
||||||
CInterfaceElement *ctrl= NULL;
|
CInterfaceElement *ctrl= NULL;
|
||||||
if(displayCycle)
|
if(displayCycle)
|
||||||
ctrl= pIM->getElementFromId(PhraseMemoryViewSlotBase + toString(_CurrentExecuteSlotCycle));
|
ctrl= CWidgetManager::getInstance()->getElementFromId(PhraseMemoryViewSlotBase + toString(_CurrentExecuteSlotCycle));
|
||||||
if(displayCycle && ctrl)
|
if(displayCycle && ctrl)
|
||||||
{
|
{
|
||||||
viewCycle->setParentPos(ctrl);
|
viewCycle->setParentPos(ctrl);
|
||||||
|
@ -1857,12 +1857,12 @@ void CSPhraseManager::updateExecutionDisplay()
|
||||||
}
|
}
|
||||||
|
|
||||||
// DisplayNextSelectionOnActionBar
|
// DisplayNextSelectionOnActionBar
|
||||||
CInterfaceElement *viewNext= pIM->getElementFromId(PhraseMemoryViewNextAction);
|
CInterfaceElement *viewNext= CWidgetManager::getInstance()->getElementFromId(PhraseMemoryViewNextAction);
|
||||||
if(viewNext)
|
if(viewNext)
|
||||||
{
|
{
|
||||||
CInterfaceElement *ctrl= NULL;
|
CInterfaceElement *ctrl= NULL;
|
||||||
if(displayNext)
|
if(displayNext)
|
||||||
ctrl= pIM->getElementFromId(PhraseMemoryViewSlotBase + toString(_CurrentExecuteSlotNext));
|
ctrl= CWidgetManager::getInstance()->getElementFromId(PhraseMemoryViewSlotBase + toString(_CurrentExecuteSlotNext));
|
||||||
if(displayNext && ctrl)
|
if(displayNext && ctrl)
|
||||||
{
|
{
|
||||||
viewNext->setParentPos(ctrl);
|
viewNext->setParentPos(ctrl);
|
||||||
|
@ -3037,13 +3037,13 @@ void CSPhraseManager::updateAllMemoryCtrlState()
|
||||||
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
for(uint i=0;i<PHRASE_MAX_MEMORY_SLOT;i++)
|
||||||
{
|
{
|
||||||
// Get the ctrl
|
// Get the ctrl
|
||||||
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryCtrlBase + toString(i)) );
|
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(PhraseMemoryCtrlBase + toString(i)) );
|
||||||
if(ctrl)
|
if(ctrl)
|
||||||
{
|
{
|
||||||
// update the valid state.
|
// update the valid state.
|
||||||
updateMemoryCtrlState(i, ctrl, itemSkill);
|
updateMemoryCtrlState(i, ctrl, itemSkill);
|
||||||
}
|
}
|
||||||
CDBCtrlSheet *ctrlAlt= dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(i)) );
|
CDBCtrlSheet *ctrlAlt= dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(PhraseMemoryAltCtrlBase + toString(i)) );
|
||||||
if(ctrlAlt)
|
if(ctrlAlt)
|
||||||
updateMemoryCtrlState(i, ctrlAlt, itemSkill);
|
updateMemoryCtrlState(i, ctrlAlt, itemSkill);
|
||||||
}
|
}
|
||||||
|
@ -3069,7 +3069,7 @@ CDBCtrlSheet *CSPhraseManager::getMemorySlotCtrl(uint memorySlot)
|
||||||
|
|
||||||
// Get the ctrl
|
// Get the ctrl
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryCtrlBase + toString(memorySlot)));
|
return dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(PhraseMemoryCtrlBase + toString(memorySlot)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -3080,7 +3080,7 @@ CDBCtrlSheet *CSPhraseManager::getMemoryAltSlotCtrl(uint memorySlot)
|
||||||
|
|
||||||
// Get the ctrl
|
// Get the ctrl
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
return dynamic_cast<CDBCtrlSheet*>(pIM->getElementFromId(PhraseMemoryAltCtrlBase + toString(memorySlot)));
|
return dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(PhraseMemoryAltCtrlBase + toString(memorySlot)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
|
@ -137,7 +137,7 @@ public:
|
||||||
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainerWindows *pGCW = dynamic_cast<CGroupContainerWindows*>(pIM->getElementFromId("ui:interface:windows"));
|
CGroupContainerWindows *pGCW = dynamic_cast<CGroupContainerWindows*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:windows"));
|
||||||
if (pGCW == NULL) return;
|
if (pGCW == NULL) return;
|
||||||
pGCW->setShowDesktops(!pGCW->getShowDesktops());
|
pGCW->setShowDesktops(!pGCW->getShowDesktops());
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ public:
|
||||||
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
|
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:gestion_windows"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:gestion_windows"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
CActionsManager *pAM = &Actions;
|
CActionsManager *pAM = &Actions;
|
||||||
const CActionsManager::TActionComboMap &acmap = pAM->getActionComboMap();
|
const CActionsManager::TActionComboMap &acmap = pAM->getActionComboMap();
|
||||||
|
@ -171,7 +171,7 @@ public:
|
||||||
|
|
||||||
CActionsManager::TActionComboMap::const_iterator it = acmap.find(CAction::CName("show_hide",sWin.c_str()));
|
CActionsManager::TActionComboMap::const_iterator it = acmap.find(CAction::CName("show_hide",sWin.c_str()));
|
||||||
string sFullTxt = string("ui:interface:gestion_windows:") + sTxt + ":key";
|
string sFullTxt = string("ui:interface:gestion_windows:") + sTxt + ":key";
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(sFullTxt));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(sFullTxt));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
if (it != acmap.end())
|
if (it != acmap.end())
|
||||||
|
|
|
@ -278,8 +278,8 @@ void CViewBitmapCombo::draw()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewRenderer &rVR = pIM->getViewRenderer();
|
CViewRenderer &rVR = pIM->getViewRenderer();
|
||||||
const std::vector<CViewBase *> &rVB = pIM->getViewsUnderPointer();
|
const std::vector<CViewBase *> &rVB = pIM->getViewsUnderPointer();
|
||||||
if (!pIM->getPointer()) return;
|
if (!CWidgetManager::getInstance()->getPointer()) return;
|
||||||
pIM->getPointer()->getPointerDispPos(mx, my);
|
CWidgetManager::getInstance()->getPointer()->getPointerDispPos(mx, my);
|
||||||
bool over = false;
|
bool over = false;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
for (i = 0; i < rVB.size(); ++i)
|
for (i = 0; i < rVB.size(); ++i)
|
||||||
|
@ -361,7 +361,7 @@ void CViewBitmapCombo::draw()
|
||||||
&& my < py + (sint32) itemh)
|
&& my < py + (sint32) itemh)
|
||||||
{
|
{
|
||||||
overItem = true;
|
overItem = true;
|
||||||
if (pIM->getPointer()->getButtonState() & NLMISC::leftButton)
|
if (CWidgetManager::getInstance()->getPointer()->getButtonState() & NLMISC::leftButton)
|
||||||
{
|
{
|
||||||
textId = getTexId(_TexsPushedId, texIndex);
|
textId = getTexId(_TexsPushedId, texIndex);
|
||||||
color = getCol(_ColPushed, texIndex);
|
color = getCol(_ColPushed, texIndex);
|
||||||
|
@ -416,7 +416,7 @@ void CViewBitmapCombo::draw()
|
||||||
//
|
//
|
||||||
if (_CD.Unrolled.getBool())
|
if (_CD.Unrolled.getBool())
|
||||||
{
|
{
|
||||||
if (overItem && pIM->getPointer()->getButtonState() & NLMISC::leftButton)
|
if (overItem && CWidgetManager::getInstance()->getPointer()->getButtonState() & NLMISC::leftButton)
|
||||||
{
|
{
|
||||||
textId = getTexId(_TexsId, selectedTexIndex);
|
textId = getTexId(_TexsId, selectedTexIndex);
|
||||||
color = getCol(_Col, selectedTexIndex);
|
color = getCol(_Col, selectedTexIndex);
|
||||||
|
@ -436,7 +436,7 @@ void CViewBitmapCombo::draw()
|
||||||
&& my < py + (sint32) itemh
|
&& my < py + (sint32) itemh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (pIM->getPointer()->getButtonState() & NLMISC::leftButton)
|
if (CWidgetManager::getInstance()->getPointer()->getButtonState() & NLMISC::leftButton)
|
||||||
{
|
{
|
||||||
textId = getTexId(_TexsPushedId, selectedTexIndex);
|
textId = getTexId(_TexsPushedId, selectedTexIndex);
|
||||||
color = getCol(_ColPushed, selectedTexIndex);
|
color = getCol(_ColPushed, selectedTexIndex);
|
||||||
|
|
|
@ -181,13 +181,13 @@ void CViewPointer::draw ()
|
||||||
|
|
||||||
_StringCursor = pIM->createGroupInstance("string_cursor", "", templateParams);
|
_StringCursor = pIM->createGroupInstance("string_cursor", "", templateParams);
|
||||||
if (_StringCursor)
|
if (_StringCursor)
|
||||||
_StringCursor->setParentPos(pIM->getElementFromId("ui:interface"));
|
_StringCursor->setParentPos(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
|
|
||||||
templateParams.clear();
|
templateParams.clear();
|
||||||
templateParams.push_back (std::pair<std::string,std::string>("id", "string_cursor_hardware"));
|
templateParams.push_back (std::pair<std::string,std::string>("id", "string_cursor_hardware"));
|
||||||
_StringCursorHardware = pIM->createGroupInstance("string_cursor_hardware", "", templateParams);
|
_StringCursorHardware = pIM->createGroupInstance("string_cursor_hardware", "", templateParams);
|
||||||
if (_StringCursorHardware)
|
if (_StringCursorHardware)
|
||||||
_StringCursorHardware->setParentPos(pIM->getElementFromId("ui:interface"));
|
_StringCursorHardware->setParentPos(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
}
|
}
|
||||||
|
|
||||||
CRGBA col;
|
CRGBA col;
|
||||||
|
@ -305,7 +305,7 @@ void CViewPointer::draw ()
|
||||||
|
|
||||||
|
|
||||||
// is the cursor currently over a modal window ?
|
// is the cursor currently over a modal window ?
|
||||||
CInterfaceGroup *currModal = pIM->getModalWindow();
|
CInterfaceGroup *currModal = CWidgetManager::getInstance()->getModalWindow();
|
||||||
if (currModal)
|
if (currModal)
|
||||||
{
|
{
|
||||||
sint32 xPos = _XReal + _OffsetX;
|
sint32 xPos = _XReal + _OffsetX;
|
||||||
|
|
|
@ -615,11 +615,11 @@ void CViewText::draw ()
|
||||||
TextContext->resetStringSelection(_Index);
|
TextContext->resetStringSelection(_Index);
|
||||||
|
|
||||||
// if single line clamped, may allow to draw an over
|
// if single line clamped, may allow to draw an over
|
||||||
if(isSingleLineTextClamped() && _OverExtendViewText && pIM->getPointer())
|
if(isSingleLineTextClamped() && _OverExtendViewText && CWidgetManager::getInstance()->getPointer())
|
||||||
{
|
{
|
||||||
// but must check first if mouse is over
|
// but must check first if mouse is over
|
||||||
sint32 x = pIM->getPointer()->getX();
|
sint32 x = CWidgetManager::getInstance()->getPointer()->getX();
|
||||||
sint32 y = pIM->getPointer()->getY();
|
sint32 y = CWidgetManager::getInstance()->getPointer()->getY();
|
||||||
bool mouseIn;
|
bool mouseIn;
|
||||||
// use parent clip or self clip?
|
// use parent clip or self clip?
|
||||||
if(_OverExtendViewTextUseParentRect)
|
if(_OverExtendViewTextUseParentRect)
|
||||||
|
|
|
@ -18,8 +18,10 @@
|
||||||
#include "interface_group.h"
|
#include "interface_group.h"
|
||||||
#include "group_container.h"
|
#include "group_container.h"
|
||||||
#include "group_in_scene.h"
|
#include "group_in_scene.h"
|
||||||
|
#include "view_pointer.h"
|
||||||
|
|
||||||
CWidgetManager* CWidgetManager::instance = NULL;
|
CWidgetManager* CWidgetManager::instance = NULL;
|
||||||
|
std::string CWidgetManager::_CtrlLaunchingModalId= "ctrl_launch_modal";
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// SMasterGroup
|
// SMasterGroup
|
||||||
|
@ -351,10 +353,356 @@ void CWidgetManager::removeAllMasterGroups()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::activateMasterGroup (const std::string &sMasterGroupName, bool bActive)
|
||||||
|
{
|
||||||
|
CInterfaceGroup *pIG = CWidgetManager::getInstance()->getMasterGroupFromId (sMasterGroupName);
|
||||||
|
if (pIG != NULL)
|
||||||
|
{
|
||||||
|
pIG->setActive(bActive);
|
||||||
|
pIG->invalidateCoords();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
CInterfaceGroup* CWidgetManager::getWindow(CInterfaceElement *pIE)
|
||||||
|
{
|
||||||
|
CInterfaceGroup *pIG = pIE->getParent();
|
||||||
|
if (pIG == NULL) return NULL;
|
||||||
|
if (pIG->getParent() == NULL) return NULL;
|
||||||
|
while (pIG->getParent()->getParent() != NULL)
|
||||||
|
{
|
||||||
|
pIG = pIG->getParent();
|
||||||
|
}
|
||||||
|
return pIG;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
CInterfaceElement* CWidgetManager::getElementFromId (const std::string &sEltId)
|
||||||
|
{
|
||||||
|
// System special
|
||||||
|
if(sEltId == _CtrlLaunchingModalId)
|
||||||
|
return getCtrlLaunchingModal();
|
||||||
|
|
||||||
|
// Search for all elements
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
CInterfaceElement *pIEL = rMG.Group->getElement (sEltId);
|
||||||
|
if (pIEL != NULL)
|
||||||
|
return pIEL;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
CInterfaceElement* CWidgetManager::getElementFromId (const std::string &sStart, const std::string &sEltId)
|
||||||
|
{
|
||||||
|
CInterfaceElement *pIEL = getElementFromId (sEltId);
|
||||||
|
if (pIEL == NULL)
|
||||||
|
{
|
||||||
|
std::string sZeStart = sStart, sTmp;
|
||||||
|
if (sZeStart[sZeStart.size()-1] == ':')
|
||||||
|
sZeStart = sZeStart.substr(0, sZeStart.size()-1);
|
||||||
|
|
||||||
|
while (sZeStart != "")
|
||||||
|
{
|
||||||
|
if (sEltId[0] == ':')
|
||||||
|
sTmp = sZeStart + sEltId;
|
||||||
|
else
|
||||||
|
sTmp = sZeStart + ":" + sEltId;
|
||||||
|
pIEL = getElementFromId (sTmp);
|
||||||
|
if (pIEL != NULL)
|
||||||
|
return pIEL;
|
||||||
|
std::string::size_type nextPos = sZeStart.rfind(':');
|
||||||
|
if (nextPos == std::string::npos) break;
|
||||||
|
sZeStart = sZeStart.substr(0, nextPos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return pIEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::setTopWindow (CInterfaceGroup* win)
|
||||||
|
{
|
||||||
|
//find the window in the window list
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
rMG.setTopWindow(win);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::setBackWindow(CInterfaceGroup* win)
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
rMG.setBackWindow(win);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
CInterfaceGroup* CWidgetManager::getTopWindow (uint8 nPriority) const
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
const CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
{
|
||||||
|
// return the first.
|
||||||
|
if(rMG.PrioritizedWindows[nPriority].empty())
|
||||||
|
return NULL;
|
||||||
|
else
|
||||||
|
return rMG.PrioritizedWindows[nPriority].back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
CInterfaceGroup* CWidgetManager::getBackWindow (uint8 nPriority) const
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
const CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
{
|
||||||
|
// return the first.
|
||||||
|
if(rMG.PrioritizedWindows[nPriority].empty())
|
||||||
|
return NULL;
|
||||||
|
else
|
||||||
|
return rMG.PrioritizedWindows[nPriority].front();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
CInterfaceGroup* CWidgetManager::getLastEscapableTopWindow() const
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
const CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
{
|
||||||
|
for (uint8 nPriority = WIN_PRIORITY_MAX; nPriority > 0; nPriority--)
|
||||||
|
{
|
||||||
|
const std::list<CInterfaceGroup*> &rList = rMG.PrioritizedWindows[nPriority-1];
|
||||||
|
std::list<CInterfaceGroup*>::const_reverse_iterator it;
|
||||||
|
it= rList.rbegin();
|
||||||
|
for(;it!=rList.rend();it++)
|
||||||
|
{
|
||||||
|
if((*it)->getActive() && (*it)->getEscapable())
|
||||||
|
return *it;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
void CWidgetManager::setWindowPriority (CInterfaceGroup *pWin, uint8 nNewPriority)
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
{
|
||||||
|
if (rMG.isWindowPresent(pWin))
|
||||||
|
{
|
||||||
|
rMG.delWindow(pWin);
|
||||||
|
rMG.addWindow(pWin, nNewPriority);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ***************************************************************************
|
||||||
|
uint8 CWidgetManager::getLastTopWindowPriority() const
|
||||||
|
{
|
||||||
|
for (uint32 nMasterGroup = 0; nMasterGroup < _MasterGroups.size(); nMasterGroup++)
|
||||||
|
{
|
||||||
|
const CWidgetManager::SMasterGroup &rMG = _MasterGroups[nMasterGroup];
|
||||||
|
if (rMG.Group->getActive())
|
||||||
|
{
|
||||||
|
return rMG.LastTopWindowPriority;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWidgetManager::hasModal() const
|
||||||
|
{
|
||||||
|
if( !_ModalStack.empty() )
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CWidgetManager::SModalWndInfo& CWidgetManager::getModal()
|
||||||
|
{
|
||||||
|
return _ModalStack.back();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWidgetManager::isPreviousModal( CInterfaceGroup *wnd ) const
|
||||||
|
{
|
||||||
|
std::vector< SModalWndInfo >::size_type s = _ModalStack.size();
|
||||||
|
for( std::vector< SModalWndInfo >::size_type i = 0; i < s; i++ )
|
||||||
|
if( _ModalStack[ i ].ModalWindow == wnd )
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::enableModalWindow (CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG)
|
||||||
|
{
|
||||||
|
// disable any modal before. release keyboard
|
||||||
|
disableModalWindow();
|
||||||
|
pushModalWindow(ctrlLaunchingModal, pIG);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::enableModalWindow (CCtrlBase *CtrlLaunchingModal, const std::string &groupName)
|
||||||
|
{
|
||||||
|
CInterfaceGroup *group= dynamic_cast<CGroupModal*>( getElementFromId(groupName) );
|
||||||
|
if(group)
|
||||||
|
{
|
||||||
|
// enable the modal
|
||||||
|
enableModalWindow(CtrlLaunchingModal, group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::disableModalWindow ()
|
||||||
|
{
|
||||||
|
while (!_ModalStack.empty())
|
||||||
|
{
|
||||||
|
SModalWndInfo winInfo = _ModalStack.back();
|
||||||
|
_ModalStack.pop_back(); // must pop back as early as possible because 'setActive' may trigger another 'popModalWindow', leading to a crash
|
||||||
|
// disable old modal window
|
||||||
|
if(winInfo.ModalWindow)
|
||||||
|
{
|
||||||
|
setBackWindow(winInfo.ModalWindow);
|
||||||
|
winInfo.ModalWindow->setActive(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// disable any context help
|
||||||
|
setCurContextHelp( NULL );
|
||||||
|
CWidgetManager::getInstance()->_DeltaTimeStopingContextHelp = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::pushModalWindow(CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG)
|
||||||
|
{
|
||||||
|
// enable the wanted modal
|
||||||
|
if(pIG)
|
||||||
|
{
|
||||||
|
SModalWndInfo mwi;
|
||||||
|
mwi.ModalWindow = pIG;
|
||||||
|
mwi.CtrlLaunchingModal = ctrlLaunchingModal;
|
||||||
|
// setup special group
|
||||||
|
CGroupModal *groupModal= dynamic_cast<CGroupModal*>(pIG);
|
||||||
|
if(groupModal)
|
||||||
|
{
|
||||||
|
mwi.ModalExitClickOut = groupModal->ExitClickOut;
|
||||||
|
mwi.ModalExitClickL = groupModal->ExitClickL;
|
||||||
|
mwi.ModalExitClickR = groupModal->ExitClickR;
|
||||||
|
mwi.ModalHandlerClickOut = groupModal->OnClickOut;
|
||||||
|
mwi.ModalClickOutParams = groupModal->OnClickOutParams;
|
||||||
|
mwi.ModalExitKeyPushed = groupModal->ExitKeyPushed;
|
||||||
|
// update coords of the modal
|
||||||
|
if(groupModal->SpawnOnMousePos)
|
||||||
|
{
|
||||||
|
groupModal->SpawnMouseX = _Pointer->getX();
|
||||||
|
groupModal->SpawnMouseY = _Pointer->getY();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// default for group not modal. Backward compatibility
|
||||||
|
mwi.ModalExitClickOut = false;
|
||||||
|
mwi.ModalExitClickL = false;
|
||||||
|
mwi.ModalExitClickR = false;
|
||||||
|
mwi.ModalExitKeyPushed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ModalStack.push_back(mwi);
|
||||||
|
|
||||||
|
// update coords and activate the modal
|
||||||
|
mwi.ModalWindow->invalidateCoords();
|
||||||
|
mwi.ModalWindow->setActive(true);
|
||||||
|
setTopWindow(mwi.ModalWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::pushModalWindow(CCtrlBase *ctrlLaunchingModal, const std::string &groupName)
|
||||||
|
{
|
||||||
|
CInterfaceGroup *group= dynamic_cast<CGroupModal*>( getElementFromId(groupName) );
|
||||||
|
if(group)
|
||||||
|
{
|
||||||
|
// enable the modal
|
||||||
|
enableModalWindow(ctrlLaunchingModal, group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::popModalWindow()
|
||||||
|
{
|
||||||
|
if (!_ModalStack.empty())
|
||||||
|
{
|
||||||
|
SModalWndInfo winInfo = _ModalStack.back();
|
||||||
|
_ModalStack.pop_back(); // must pop back as early as possible because 'setActive' may trigger another 'popModalWindow', leading to a crash
|
||||||
|
if(winInfo.ModalWindow)
|
||||||
|
{
|
||||||
|
setBackWindow(winInfo.ModalWindow);
|
||||||
|
winInfo.ModalWindow->setActive(false);
|
||||||
|
}
|
||||||
|
if (!_ModalStack.empty())
|
||||||
|
{
|
||||||
|
if(_ModalStack.back().ModalWindow)
|
||||||
|
{
|
||||||
|
_ModalStack.back().ModalWindow->setActive(true);
|
||||||
|
setTopWindow(_ModalStack.back().ModalWindow);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
void CWidgetManager::popModalWindowCategory(const std::string &category)
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
if (_ModalStack.empty()) break;
|
||||||
|
if (!_ModalStack.back().ModalWindow) break;
|
||||||
|
CGroupModal *gm = dynamic_cast<CGroupModal *>((CInterfaceGroup*)(_ModalStack.back().ModalWindow));
|
||||||
|
if (gm && gm->Category == category)
|
||||||
|
{
|
||||||
|
_ModalStack.back().ModalWindow->setActive(false);
|
||||||
|
_ModalStack.pop_back();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
CWidgetManager::CWidgetManager()
|
CWidgetManager::CWidgetManager()
|
||||||
{
|
{
|
||||||
|
_Pointer = NULL;
|
||||||
|
curContextHelp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
CWidgetManager::~CWidgetManager()
|
CWidgetManager::~CWidgetManager()
|
||||||
|
@ -363,4 +711,7 @@ CWidgetManager::~CWidgetManager()
|
||||||
{
|
{
|
||||||
delete _MasterGroups[i].Group;
|
delete _MasterGroups[i].Group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_Pointer = NULL;
|
||||||
|
curContextHelp = NULL;
|
||||||
}
|
}
|
|
@ -23,13 +23,16 @@
|
||||||
#include "nel/misc/types_nl.h"
|
#include "nel/misc/types_nl.h"
|
||||||
#include "nel/gui/interface_common.h"
|
#include "nel/gui/interface_common.h"
|
||||||
|
|
||||||
|
class CInterfaceElement;
|
||||||
|
class CCtrlBase;
|
||||||
class CInterfaceGroup;
|
class CInterfaceGroup;
|
||||||
|
class CViewPointer;
|
||||||
|
|
||||||
/// Manages the GUI widgets
|
/// Manages the GUI widgets
|
||||||
class CWidgetManager{
|
class CWidgetManager{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Master groups encapsulate all windows
|
||||||
struct SMasterGroup
|
struct SMasterGroup
|
||||||
{
|
{
|
||||||
SMasterGroup()
|
SMasterGroup()
|
||||||
|
@ -59,6 +62,32 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// Infos about a modal window.
|
||||||
|
struct SModalWndInfo
|
||||||
|
{
|
||||||
|
// Yoyo: store as CRefPtr in case they are deleted (can happen for instance if menu right click on a guild memeber, and guild members are udpated after)
|
||||||
|
NLMISC::CRefPtr< CInterfaceGroup > ModalWindow; // the current modal window
|
||||||
|
NLMISC::CRefPtr< CCtrlBase > CtrlLaunchingModal;
|
||||||
|
bool ModalClip;
|
||||||
|
bool ModalExitClickOut;
|
||||||
|
bool ModalExitClickL;
|
||||||
|
bool ModalExitClickR;
|
||||||
|
bool ModalExitKeyPushed;
|
||||||
|
std::string ModalHandlerClickOut;
|
||||||
|
std::string ModalClickOutParams;
|
||||||
|
|
||||||
|
SModalWndInfo()
|
||||||
|
{
|
||||||
|
ModalWindow = NULL;
|
||||||
|
CtrlLaunchingModal = NULL;
|
||||||
|
ModalExitClickOut = false;
|
||||||
|
ModalExitClickL = false;
|
||||||
|
ModalExitClickR = false;
|
||||||
|
ModalExitKeyPushed = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static CWidgetManager* getInstance();
|
static CWidgetManager* getInstance();
|
||||||
static void release();
|
static void release();
|
||||||
|
|
||||||
|
@ -70,14 +99,94 @@ public:
|
||||||
void removeWindowFromMasterGroup( const std::string &sMasterGroupName, CInterfaceGroup *pIG );
|
void removeWindowFromMasterGroup( const std::string &sMasterGroupName, CInterfaceGroup *pIG );
|
||||||
void removeAllMasterGroups();
|
void removeAllMasterGroups();
|
||||||
|
|
||||||
|
void activateMasterGroup (const std::string &sMasterGroupName, bool bActive);
|
||||||
|
|
||||||
|
CInterfaceElement* getElementFromId( const std::string &sEltId );
|
||||||
|
CInterfaceElement* getElementFromId( const std::string &sStart, const std::string &sEltId );
|
||||||
|
|
||||||
|
/// Get the window from an element (ui:interface:###)
|
||||||
|
CInterfaceGroup* getWindow(CInterfaceElement*);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set the top window
|
||||||
|
* \param win : pointer to the window to be set on top
|
||||||
|
*/
|
||||||
|
void setTopWindow (CInterfaceGroup *pWin);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set the back window
|
||||||
|
* \param win : pointer to the window to be set on top
|
||||||
|
*/
|
||||||
|
void setBackWindow (CInterfaceGroup *pWin);
|
||||||
|
|
||||||
|
/** get the top window in the first activated masterGroup
|
||||||
|
*/
|
||||||
|
CInterfaceGroup* getTopWindow (uint8 nPriority = WIN_PRIORITY_NORMAL) const;
|
||||||
|
|
||||||
|
/** get the back window in the first activated masterGroup
|
||||||
|
*/
|
||||||
|
CInterfaceGroup* getBackWindow (uint8 nPriority = WIN_PRIORITY_NORMAL) const;
|
||||||
|
|
||||||
|
/** get the last escapable top window in the first activated masterGroup
|
||||||
|
*/
|
||||||
|
CInterfaceGroup* getLastEscapableTopWindow() const;
|
||||||
|
|
||||||
|
void setWindowPriority (CInterfaceGroup *pWin, uint8 nPriority);
|
||||||
|
|
||||||
|
/** return the priority of the Last Window setTopWindow()-ed.
|
||||||
|
*/
|
||||||
|
uint8 getLastTopWindowPriority() const;
|
||||||
|
|
||||||
|
bool hasModal() const;
|
||||||
|
|
||||||
|
SModalWndInfo& getModal();
|
||||||
|
|
||||||
|
bool isPreviousModal( CInterfaceGroup *wnd ) const;
|
||||||
|
|
||||||
|
void enableModalWindow (CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG);
|
||||||
|
void enableModalWindow (CCtrlBase *ctrlLaunchingModal, const std::string &groupName);
|
||||||
|
// Disable all modals windows
|
||||||
|
void disableModalWindow ();
|
||||||
|
|
||||||
|
/** Push a modal window that becomes the current modal window
|
||||||
|
*/
|
||||||
|
void pushModalWindow(CCtrlBase *ctrlLaunchingModal, CInterfaceGroup *pIG);
|
||||||
|
void pushModalWindow (CCtrlBase *ctrlLaunchingModal, const std::string &groupName);
|
||||||
|
void popModalWindow();
|
||||||
|
// pop all top modal windows with the given category (a string stored in the modal)
|
||||||
|
void popModalWindowCategory(const std::string &category);
|
||||||
|
|
||||||
|
CCtrlBase *getCtrlLaunchingModal ()
|
||||||
|
{
|
||||||
|
if (_ModalStack.empty()) return NULL;
|
||||||
|
return _ModalStack.back().CtrlLaunchingModal;
|
||||||
|
}
|
||||||
|
/// get the currently active modal window, or NULL if none
|
||||||
|
CInterfaceGroup *getModalWindow() const
|
||||||
|
{
|
||||||
|
if (_ModalStack.empty()) return NULL;
|
||||||
|
return _ModalStack.back().ModalWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setCurContextHelp( CCtrlBase *curContextHelp ){ this->curContextHelp = curContextHelp; }
|
||||||
|
CCtrlBase* getCurContextHelp(){ return curContextHelp; }
|
||||||
|
|
||||||
|
float _DeltaTimeStopingContextHelp;
|
||||||
|
|
||||||
|
CViewPointer* getPointer(){ return _Pointer; }
|
||||||
|
void setPointer( CViewPointer *pointer ){ _Pointer = pointer; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CWidgetManager();
|
CWidgetManager();
|
||||||
~CWidgetManager();
|
~CWidgetManager();
|
||||||
|
|
||||||
static CWidgetManager *instance;
|
static CWidgetManager *instance;
|
||||||
|
|
||||||
// Master groups encapsulate all windows
|
|
||||||
std::vector< SMasterGroup > _MasterGroups;
|
std::vector< SMasterGroup > _MasterGroups;
|
||||||
|
std::vector< SModalWndInfo > _ModalStack;
|
||||||
|
static std::string _CtrlLaunchingModalId;
|
||||||
|
NLMISC::CRefPtr< CCtrlBase > curContextHelp;
|
||||||
|
CViewPointer *_Pointer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -162,7 +162,7 @@ static void errorMessageBox(const ucstring &msg)
|
||||||
void createOptionalCatUI()
|
void createOptionalCatUI()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_CAT));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CAT));
|
||||||
if (pList == NULL)
|
if (pList == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
||||||
|
@ -229,7 +229,7 @@ void initEula()
|
||||||
static void setDataScanLog(const ucstring &text)
|
static void setDataScanLog(const ucstring &text)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:datascan:content:log_txt:log"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:datascan:content:log_txt:log"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
pVT->setText(text);
|
pVT->setText(text);
|
||||||
|
@ -240,10 +240,10 @@ static void setDataScanLog(const ucstring &text)
|
||||||
static void setDataScanState(const ucstring &text, ucstring progress= ucstring())
|
static void setDataScanState(const ucstring &text, ucstring progress= ucstring())
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:datascan:content:state"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:datascan:content:state"));
|
||||||
if (pVT != NULL) pVT->setText(text);
|
if (pVT != NULL) pVT->setText(text);
|
||||||
|
|
||||||
pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:datascan:content:progress"));
|
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:datascan:content:progress"));
|
||||||
if (pVT != NULL) pVT->setText(progress);
|
if (pVT != NULL) pVT->setText(progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,7 @@ void initReboot()
|
||||||
static void setPatcherStateText(const std::string &baseUIPath, const ucstring &str)
|
static void setPatcherStateText(const std::string &baseUIPath, const ucstring &str)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(baseUIPath + ":content:state"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(baseUIPath + ":content:state"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
pVT->setText(str);
|
pVT->setText(str);
|
||||||
|
@ -291,7 +291,7 @@ static void setPatcherStateText(const std::string &baseUIPath, const ucstring &s
|
||||||
static void setPatcherProgressText(const std::string &baseUIPath, const ucstring &str)
|
static void setPatcherProgressText(const std::string &baseUIPath, const ucstring &str)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(baseUIPath + ":content:progress"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(baseUIPath + ":content:progress"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
pVT->setText(str);
|
pVT->setText(str);
|
||||||
|
@ -657,7 +657,7 @@ void loginMainLoop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_TOTAL_SIZE_PATCH));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TOTAL_SIZE_PATCH));
|
||||||
ucstring sTmp;
|
ucstring sTmp;
|
||||||
sTmp = BGDownloader::getWrittenSize(currentPatchingSize);
|
sTmp = BGDownloader::getWrittenSize(currentPatchingSize);
|
||||||
sTmp += " / " + BGDownloader::getWrittenSize(totalPatchSize);
|
sTmp += " / " + BGDownloader::getWrittenSize(totalPatchSize);
|
||||||
|
@ -672,7 +672,7 @@ void loginMainLoop()
|
||||||
uint32 nNonOptSize = 0;
|
uint32 nNonOptSize = 0;
|
||||||
TotalPatchSize = 0;
|
TotalPatchSize = 0;
|
||||||
vector<sint32> ReqCat;
|
vector<sint32> ReqCat;
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_CAT));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CAT));
|
||||||
if (pList != NULL)
|
if (pList != NULL)
|
||||||
{
|
{
|
||||||
for(uint i = 0; i < InfoOnPatch.OptCat.size(); i++)
|
for(uint i = 0; i < InfoOnPatch.OptCat.size(); i++)
|
||||||
|
@ -709,10 +709,10 @@ void loginMainLoop()
|
||||||
TotalPatchSize += nNonOptSize;
|
TotalPatchSize += nNonOptSize;
|
||||||
// Total size of the patches is optional cats + required cat (f(optCat)) + non opt cat
|
// Total size of the patches is optional cats + required cat (f(optCat)) + non opt cat
|
||||||
|
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_TOTAL_SIZE));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TOTAL_SIZE));
|
||||||
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(TotalPatchSize));
|
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(TotalPatchSize));
|
||||||
|
|
||||||
pVT = dynamic_cast<CViewText*>(pIM->getElementFromId(VIEW_NON_OPTIONAL_SIZE));
|
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_NON_OPTIONAL_SIZE));
|
||||||
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(nNonOptSize));
|
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(nNonOptSize));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -739,7 +739,7 @@ void initLoginScreen()
|
||||||
|
|
||||||
if(!l.empty())
|
if(!l.empty())
|
||||||
{
|
{
|
||||||
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
if (pGEB != NULL && (pGEB->getInputString().empty()))
|
if (pGEB != NULL && (pGEB->getInputString().empty()))
|
||||||
{
|
{
|
||||||
pGEB->setInputString(l);
|
pGEB->setInputString(l);
|
||||||
|
@ -752,7 +752,7 @@ void initLoginScreen()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CCtrlTextButton *pCB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId(CTRL_BUTTON_CONNECT));
|
CCtrlTextButton *pCB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_CONNECT));
|
||||||
if (pCB != NULL) pCB->setActive(false);
|
if (pCB != NULL) pCB->setActive(false);
|
||||||
|
|
||||||
loginFinished = false;
|
loginFinished = false;
|
||||||
|
@ -762,8 +762,8 @@ void initLoginScreen()
|
||||||
void initAutoLogin()
|
void initAutoLogin()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
||||||
pGEBLog->setInputString(LoginLogin);
|
pGEBLog->setInputString(LoginLogin);
|
||||||
pGEBPwd->setInputString(LoginPassword);
|
pGEBPwd->setInputString(LoginPassword);
|
||||||
pIM->runActionHandler("on_login", NULL, "");
|
pIM->runActionHandler("on_login", NULL, "");
|
||||||
|
@ -831,17 +831,17 @@ bool login()
|
||||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||||
//
|
//
|
||||||
// // hide 'back to login' button
|
// // hide 'back to login' button
|
||||||
// CInterfaceElement *backToLogin = pIM->getElementFromId(CTRL_BUTTON_BACKTOLOGIN);
|
// CInterfaceElement *backToLogin = CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_BACKTOLOGIN);
|
||||||
// if (backToLogin)
|
// if (backToLogin)
|
||||||
// backToLogin->setActive(false);
|
// backToLogin->setActive(false);
|
||||||
//
|
//
|
||||||
// // show 'reload test page' button
|
// // show 'reload test page' button
|
||||||
// CInterfaceElement *reloadTest = pIM->getElementFromId(CTRL_BUTTON_RELOADTESTPAGE);
|
// CInterfaceElement *reloadTest = CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_RELOADTESTPAGE);
|
||||||
// if (reloadTest)
|
// if (reloadTest)
|
||||||
// reloadTest->setActive(true);
|
// reloadTest->setActive(true);
|
||||||
//
|
//
|
||||||
// // start the browser
|
// // start the browser
|
||||||
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(GROUP_BROWSER));
|
||||||
//
|
//
|
||||||
// pGH->browse(ClientCfg.TestBrowserUrl.c_str());
|
// pGH->browse(ClientCfg.TestBrowserUrl.c_str());
|
||||||
//
|
//
|
||||||
|
@ -866,7 +866,7 @@ bool login()
|
||||||
//
|
//
|
||||||
// if(!l.empty())
|
// if(!l.empty())
|
||||||
// {
|
// {
|
||||||
// CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
// CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
// if (pGEB != NULL)
|
// if (pGEB != NULL)
|
||||||
// pGEB->setInputString(l);
|
// pGEB->setInputString(l);
|
||||||
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
|
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
|
||||||
|
@ -877,7 +877,7 @@ bool login()
|
||||||
// }
|
// }
|
||||||
|
|
||||||
ShardSelected = -1;
|
ShardSelected = -1;
|
||||||
// CCtrlTextButton *pCB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId(CTRL_BUTTON_CONNECT));
|
// CCtrlTextButton *pCB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_CONNECT));
|
||||||
// if (pCB != NULL) pCB->setActive(false);
|
// if (pCB != NULL) pCB->setActive(false);
|
||||||
//
|
//
|
||||||
// loginFinished = false;
|
// loginFinished = false;
|
||||||
|
@ -887,8 +887,8 @@ bool login()
|
||||||
// if (!LoginLogin.empty())
|
// if (!LoginLogin.empty())
|
||||||
// {
|
// {
|
||||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
// CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
// CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
// CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
||||||
// pGEBLog->setInputString(LoginLogin);
|
// pGEBLog->setInputString(LoginLogin);
|
||||||
// pGEBPwd->setInputString(LoginPassword);
|
// pGEBPwd->setInputString(LoginPassword);
|
||||||
// pIM->runActionHandler("on_login", NULL, "");
|
// pIM->runActionHandler("on_login", NULL, "");
|
||||||
|
@ -1031,7 +1031,7 @@ void initShardDisplay()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||||
|
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_SHARD));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD));
|
||||||
if (pList == NULL)
|
if (pList == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("element "GROUP_LIST_SHARD" not found probably bad login_main.xml");
|
nlwarning("element "GROUP_LIST_SHARD" not found probably bad login_main.xml");
|
||||||
|
@ -1087,7 +1087,7 @@ void initShardDisplay()
|
||||||
// UI Patch
|
// UI Patch
|
||||||
if (!Shards.empty())
|
if (!Shards.empty())
|
||||||
{
|
{
|
||||||
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
|
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
pCB->setPushed(true);
|
pCB->setPushed(true);
|
||||||
pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
|
pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
|
||||||
|
@ -1147,7 +1147,7 @@ void onlogin(bool vanishScreen = true)
|
||||||
//
|
//
|
||||||
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
// CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
// // start the browser
|
// // start the browser
|
||||||
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(GROUP_BROWSER));
|
||||||
//
|
//
|
||||||
// pGH->browse(RingMainURL.c_str());
|
// pGH->browse(RingMainURL.c_str());
|
||||||
// }
|
// }
|
||||||
|
@ -1158,7 +1158,7 @@ void onlogin(bool vanishScreen = true)
|
||||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_SHARDDISP);
|
||||||
}
|
}
|
||||||
|
|
||||||
// CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_SHARD));
|
// CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD));
|
||||||
// if (pList == NULL)
|
// if (pList == NULL)
|
||||||
// {
|
// {
|
||||||
// nlwarning("element "GROUP_LIST_SHARD" not found probably bad login_main.xml");
|
// nlwarning("element "GROUP_LIST_SHARD" not found probably bad login_main.xml");
|
||||||
|
@ -1214,7 +1214,7 @@ void onlogin(bool vanishScreen = true)
|
||||||
// // UI Patch
|
// // UI Patch
|
||||||
// if (!Shards.empty())
|
// if (!Shards.empty())
|
||||||
// {
|
// {
|
||||||
// CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
|
// CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
|
||||||
// if (pCB != NULL)
|
// if (pCB != NULL)
|
||||||
// pCB->setPushed(true);
|
// pCB->setPushed(true);
|
||||||
// pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
|
// pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
|
||||||
|
@ -1248,8 +1248,8 @@ class CAHOnLogin : public IActionHandler
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
CGroupEditBox *pGEBLog = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
||||||
if ((pGEBLog == NULL) || (pGEBPwd == NULL))
|
if ((pGEBLog == NULL) || (pGEBPwd == NULL))
|
||||||
{
|
{
|
||||||
nlwarning("element "CTRL_EDITBOX_LOGIN" or "CTRL_EDITBOX_PASSWORD" not found probably bad login_main.xml");
|
nlwarning("element "CTRL_EDITBOX_LOGIN" or "CTRL_EDITBOX_PASSWORD" not found probably bad login_main.xml");
|
||||||
|
@ -1325,9 +1325,9 @@ class CAHLoginTab : public IActionHandler
|
||||||
CCtrlBase *pNewCB;
|
CCtrlBase *pNewCB;
|
||||||
string sID = pCB->getId();
|
string sID = pCB->getId();
|
||||||
if (sID == CTRL_EDITBOX_LOGIN)
|
if (sID == CTRL_EDITBOX_LOGIN)
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
|
||||||
else
|
else
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
pIM->setCaptureKeyboard(pNewCB);
|
pIM->setCaptureKeyboard(pNewCB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1339,13 +1339,13 @@ class CAHLoginTab : public IActionHandler
|
||||||
CCtrlBase *pNewCB;
|
CCtrlBase *pNewCB;
|
||||||
string sID = pCB->getId();
|
string sID = pCB->getId();
|
||||||
if (sID == CTRL_EDITBOX_CREATEACCOUNT_LOGIN)
|
if (sID == CTRL_EDITBOX_CREATEACCOUNT_LOGIN)
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_PASSWORD));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_PASSWORD));
|
||||||
else if (sID == CTRL_EDITBOX_CREATEACCOUNT_PASSWORD)
|
else if (sID == CTRL_EDITBOX_CREATEACCOUNT_PASSWORD)
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_CONFIRMPASSWORD));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_CONFIRMPASSWORD));
|
||||||
else if (sID == CTRL_EDITBOX_CREATEACCOUNT_CONFIRMPASSWORD)
|
else if (sID == CTRL_EDITBOX_CREATEACCOUNT_CONFIRMPASSWORD)
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_EMAIL));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_EMAIL));
|
||||||
else
|
else
|
||||||
pNewCB = dynamic_cast<CCtrlBase*>(pIM->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_LOGIN));
|
pNewCB = dynamic_cast<CCtrlBase*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_CREATEACCOUNT_LOGIN));
|
||||||
pIM->setCaptureKeyboard(pNewCB);
|
pIM->setCaptureKeyboard(pNewCB);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1367,7 +1367,7 @@ class CAHShardSelect : public IActionHandler
|
||||||
// Unselect
|
// Unselect
|
||||||
if (ShardSelected != -1)
|
if (ShardSelected != -1)
|
||||||
{
|
{
|
||||||
pCB = dynamic_cast<CCtrlButton*>(pIM->getElementFromId(GROUP_LIST_SHARD ":s"+toString(ShardSelected)+":but"));
|
pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD ":s"+toString(ShardSelected)+":but"));
|
||||||
if (pCB != NULL)
|
if (pCB != NULL)
|
||||||
pCB->setPushed(false);
|
pCB->setPushed(false);
|
||||||
}
|
}
|
||||||
|
@ -1383,7 +1383,7 @@ class CAHShardSelect : public IActionHandler
|
||||||
pCB->setPushed(true);
|
pCB->setPushed(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
CCtrlTextButton *pCTB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId(CTRL_BUTTON_CONNECT));
|
CCtrlTextButton *pCTB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_CONNECT));
|
||||||
if (pCTB != NULL)
|
if (pCTB != NULL)
|
||||||
pCTB->setActive(true);
|
pCTB->setActive(true);
|
||||||
}
|
}
|
||||||
|
@ -1533,7 +1533,7 @@ void initPatch()
|
||||||
// Get the list of optional categories to patch
|
// Get the list of optional categories to patch
|
||||||
vector<string> vCategories;
|
vector<string> vCategories;
|
||||||
|
|
||||||
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_CAT));
|
CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CAT));
|
||||||
if (pList == NULL)
|
if (pList == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
||||||
|
@ -1573,7 +1573,7 @@ void initPatch()
|
||||||
}
|
}
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_PATCHING);
|
||||||
|
|
||||||
CInterfaceElement *closeBtn = pIM->getElementFromId(CTRL_BUTTON_CLOSE_PATCH);
|
CInterfaceElement *closeBtn = CWidgetManager::getInstance()->getElementFromId(CTRL_BUTTON_CLOSE_PATCH);
|
||||||
if (closeBtn)
|
if (closeBtn)
|
||||||
closeBtn->setActive(false);
|
closeBtn->setActive(false);
|
||||||
|
|
||||||
|
@ -1597,7 +1597,7 @@ class CAHLoginPatch : public IActionHandler
|
||||||
// // Get the list of optional categories to patch
|
// // Get the list of optional categories to patch
|
||||||
// vector<string> vCategories;
|
// vector<string> vCategories;
|
||||||
//
|
//
|
||||||
// CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId(GROUP_LIST_CAT));
|
// CInterfaceGroup *pList = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_CAT));
|
||||||
// if (pList == NULL)
|
// if (pList == NULL)
|
||||||
// {
|
// {
|
||||||
// nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
// nlwarning("element "GROUP_LIST_CAT" not found probably bad login_main.xml");
|
||||||
|
@ -1666,7 +1666,7 @@ class CAHSetReleaseNote : public IActionHandler
|
||||||
string sShard = getParam(sParams, "shard");
|
string sShard = getParam(sParams, "shard");
|
||||||
string sGroupHtml = getParam(sParams, "group");
|
string sGroupHtml = getParam(sParams, "group");
|
||||||
|
|
||||||
CGroupHTML *pQH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(sGroupHtml));
|
CGroupHTML *pQH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(sGroupHtml));
|
||||||
if (pQH == NULL)
|
if (pQH == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1761,7 +1761,7 @@ class CAHAcceptEula : public IActionHandler
|
||||||
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_WEBSTART);
|
||||||
//
|
//
|
||||||
// // start the browser
|
// // start the browser
|
||||||
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(pIM->getElementFromId(GROUP_BROWSER));
|
// CGroupHTML *pGH = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId(GROUP_BROWSER));
|
||||||
//
|
//
|
||||||
// pGH->browse(RingMainURL.c_str());
|
// pGH->browse(RingMainURL.c_str());
|
||||||
// }
|
// }
|
||||||
|
@ -1912,7 +1912,7 @@ class CAHInitResLod : public IActionHandler
|
||||||
CurrentMode = 1;
|
CurrentMode = 1;
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:res_value"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:res_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringModeList[CurrentMode]);
|
pVT->setHardText(StringModeList[CurrentMode]);
|
||||||
|
|
||||||
|
@ -1989,7 +1989,7 @@ class CAHInitResLod : public IActionHandler
|
||||||
else if (nPreset&8) CurrentPreset = 3;
|
else if (nPreset&8) CurrentPreset = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:lod_value"));
|
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:lod_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringPresetList[CurrentPreset]);
|
pVT->setHardText(StringPresetList[CurrentPreset]);
|
||||||
}
|
}
|
||||||
|
@ -2005,7 +2005,7 @@ class CAHMoreRes : public IActionHandler
|
||||||
if (CurrentMode < ((sint)StringModeList.size()-1))
|
if (CurrentMode < ((sint)StringModeList.size()-1))
|
||||||
CurrentMode++;
|
CurrentMode++;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:res_value"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:res_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringModeList[CurrentMode]);
|
pVT->setHardText(StringModeList[CurrentMode]);
|
||||||
}
|
}
|
||||||
|
@ -2021,7 +2021,7 @@ class CAHLessRes : public IActionHandler
|
||||||
if (CurrentMode > 0)
|
if (CurrentMode > 0)
|
||||||
CurrentMode--;
|
CurrentMode--;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:res_value"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:res_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringModeList[CurrentMode]);
|
pVT->setHardText(StringModeList[CurrentMode]);
|
||||||
}
|
}
|
||||||
|
@ -2037,7 +2037,7 @@ class CAHMoreLod : public IActionHandler
|
||||||
if (CurrentPreset < ((sint)StringPresetList.size()-1))
|
if (CurrentPreset < ((sint)StringPresetList.size()-1))
|
||||||
CurrentPreset++;
|
CurrentPreset++;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:lod_value"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:lod_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringPresetList[CurrentPreset]);
|
pVT->setHardText(StringPresetList[CurrentPreset]);
|
||||||
}
|
}
|
||||||
|
@ -2053,7 +2053,7 @@ class CAHLessLod : public IActionHandler
|
||||||
if (CurrentPreset > 0)
|
if (CurrentPreset > 0)
|
||||||
CurrentPreset--;
|
CurrentPreset--;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:login:checkpass:content:lod_value"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:lod_value"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setHardText(StringPresetList[CurrentPreset]);
|
pVT->setHardText(StringPresetList[CurrentPreset]);
|
||||||
}
|
}
|
||||||
|
@ -2168,7 +2168,7 @@ class CAHOnScanDataClose : public IActionHandler
|
||||||
//
|
//
|
||||||
// // Give focus to password if some login entered
|
// // Give focus to password if some login entered
|
||||||
// string loginEB;
|
// string loginEB;
|
||||||
// CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(pIM->getElementFromId(CTRL_EDITBOX_LOGIN));
|
// CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
|
||||||
// if(pGEB)
|
// if(pGEB)
|
||||||
// loginEB= pGEB->getInputStringAsStdString();
|
// loginEB= pGEB->getInputStringAsStdString();
|
||||||
// // if none entered
|
// // if none entered
|
||||||
|
@ -2234,7 +2234,7 @@ bool initCreateAccount()
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// reset UI
|
// reset UI
|
||||||
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:login:create_account"));
|
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:login:create_account"));
|
||||||
if(createAccountUI)
|
if(createAccountUI)
|
||||||
{
|
{
|
||||||
// show "submit interface", hide "login interface"
|
// show "submit interface", hide "login interface"
|
||||||
|
@ -2372,7 +2372,7 @@ class CAHCreateAccountRules : public IActionHandler
|
||||||
nlinfo("CAHCreateAccountRules called");
|
nlinfo("CAHCreateAccountRules called");
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:login:create_account"));
|
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:login:create_account"));
|
||||||
if(createAccountUI)
|
if(createAccountUI)
|
||||||
{
|
{
|
||||||
CInterfaceGroup * rulesGr = dynamic_cast<CInterfaceGroup*>(createAccountUI->findFromShortId("rules_gr"));
|
CInterfaceGroup * rulesGr = dynamic_cast<CInterfaceGroup*>(createAccountUI->findFromShortId("rules_gr"));
|
||||||
|
@ -2426,7 +2426,7 @@ class CAHOnCreateAccountSubmit : public IActionHandler
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:login:create_account"));
|
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:login:create_account"));
|
||||||
if(createAccountUI)
|
if(createAccountUI)
|
||||||
{
|
{
|
||||||
// recover data from UI
|
// recover data from UI
|
||||||
|
@ -2589,7 +2589,7 @@ class CAHCreateAccountLogin : public IActionHandler
|
||||||
|
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:login:create_account"));
|
CInterfaceGroup *createAccountUI = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:login:create_account"));
|
||||||
if(createAccountUI)
|
if(createAccountUI)
|
||||||
{
|
{
|
||||||
CGroupEditBox * eb = dynamic_cast<CGroupEditBox*>(createAccountUI->findFromShortId("eb_login:eb"));
|
CGroupEditBox * eb = dynamic_cast<CGroupEditBox*>(createAccountUI->findFromShortId("eb_login:eb"));
|
||||||
|
|
|
@ -1310,44 +1310,44 @@ void updateGameQuitting()
|
||||||
// update the window
|
// update the window
|
||||||
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
CInterfaceManager *pIM= CInterfaceManager::getInstance();
|
||||||
|
|
||||||
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:free_trial_game_quitting"));
|
CInterfaceGroup *group= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:free_trial_game_quitting"));
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// if Free trial
|
// if Free trial
|
||||||
if(paying_account_request)
|
if(paying_account_request)
|
||||||
{
|
{
|
||||||
// if no current modal window, or if not the quit window
|
// if no current modal window, or if not the quit window
|
||||||
if(group != pIM->getModalWindow())
|
if(group != CWidgetManager::getInstance()->getModalWindow())
|
||||||
{
|
{
|
||||||
// disable
|
// disable
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
pIM->enableModalWindow(NULL, group);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if the current modal window is the quit window, disable
|
// if the current modal window is the quit window, disable
|
||||||
if(group == pIM->getModalWindow())
|
if(group == CWidgetManager::getInstance()->getModalWindow())
|
||||||
{
|
{
|
||||||
// disable
|
// disable
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
group= dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:game_quitting"));
|
group= dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:game_quitting"));
|
||||||
if(group)
|
if(group)
|
||||||
{
|
{
|
||||||
// if exit request
|
// if exit request
|
||||||
if(game_exit_request && !paying_account_request)
|
if(game_exit_request && !paying_account_request)
|
||||||
{
|
{
|
||||||
// if no current modal window, or if not the quit window
|
// if no current modal window, or if not the quit window
|
||||||
if(group != pIM->getModalWindow())
|
if(group != CWidgetManager::getInstance()->getModalWindow())
|
||||||
{
|
{
|
||||||
// disable
|
// disable
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
pIM->enableModalWindow(NULL, group);
|
CWidgetManager::getInstance()->enableModalWindow(NULL, group);
|
||||||
|
|
||||||
bool farTPing = FarTP.isFarTPInProgress();
|
bool farTPing = FarTP.isFarTPInProgress();
|
||||||
// Far TP: skipping not allowed (because we can't duplicate the avatar...), anyway the quit button would quit the game (no far tp)
|
// Far TP: skipping not allowed (because we can't duplicate the avatar...), anyway the quit button would quit the game (no far tp)
|
||||||
|
@ -1370,10 +1370,10 @@ void updateGameQuitting()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if the current modal window is the quit window, disable
|
// if the current modal window is the quit window, disable
|
||||||
if(group == pIM->getModalWindow())
|
if(group == CWidgetManager::getInstance()->getModalWindow())
|
||||||
{
|
{
|
||||||
// disable
|
// disable
|
||||||
pIM->disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1738,7 +1738,7 @@ bool mainLoop()
|
||||||
if(!pIMinstance->getViewRenderer().isMinimized())
|
if(!pIMinstance->getViewRenderer().isMinimized())
|
||||||
{
|
{
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = pIMinstance->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
// Get the pointer position (in pixel)
|
// Get the pointer position (in pixel)
|
||||||
|
@ -1778,7 +1778,7 @@ bool mainLoop()
|
||||||
{
|
{
|
||||||
// When database received, activate allegiance buttons (for neutral state) in fame window
|
// When database received, activate allegiance buttons (for neutral state) in fame window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:fame:content:you"));
|
CInterfaceGroup *group = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:fame:content:you"));
|
||||||
if (group)
|
if (group)
|
||||||
group->updateAllLinks();
|
group->updateAllLinks();
|
||||||
// send a msg to lua for specific ui update
|
// send a msg to lua for specific ui update
|
||||||
|
@ -4552,11 +4552,11 @@ void inGamePatchUncompleteWarning()
|
||||||
im->executeLuaScript("bgdownloader:inGamePatchUncompleteWarning()");
|
im->executeLuaScript("bgdownloader:inGamePatchUncompleteWarning()");
|
||||||
/*
|
/*
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(im->getElementFromId("ui:interface:bg_downloader"));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:bg_downloader"));
|
||||||
if (gc)
|
if (gc)
|
||||||
{
|
{
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->enableBlink(2);
|
gc->enableBlink(2);
|
||||||
}
|
}
|
||||||
im->messageBoxWithHelp(CI18N::get("uiBGD_InGamePatchIncomplete"));
|
im->messageBoxWithHelp(CI18N::get("uiBGD_InGamePatchIncomplete"));
|
||||||
|
|
|
@ -150,7 +150,7 @@ void CUserControls::aiMode()
|
||||||
IM->enableMouseHandling(false);
|
IM->enableMouseHandling(false);
|
||||||
EventsListener.enableMouseSmoothing(true);
|
EventsListener.enableMouseSmoothing(true);
|
||||||
// Get the cursor instance and hide.
|
// Get the cursor instance and hide.
|
||||||
CViewPointer *cursor = IM->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
// Freelook mode.
|
// Freelook mode.
|
||||||
|
|
|
@ -507,7 +507,7 @@ void CUserControls::freeLook(bool fullMode)
|
||||||
// disable interface mouse handling.
|
// disable interface mouse handling.
|
||||||
IM->enableMouseHandling(false);
|
IM->enableMouseHandling(false);
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = IM->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
// Hide the Cursor.
|
// Hide the Cursor.
|
||||||
|
@ -590,7 +590,7 @@ void CUserControls::cameraLook(bool fullMode)
|
||||||
// disable interface mouse handling.
|
// disable interface mouse handling.
|
||||||
IM->enableMouseHandling(false);
|
IM->enableMouseHandling(false);
|
||||||
// Get the cursor instance
|
// Get the cursor instance
|
||||||
CViewPointer *cursor = IM->getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
// Hide the Cursor.
|
// Hide the Cursor.
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ void setFakeNews ()
|
||||||
iname += table[i];
|
iname += table[i];
|
||||||
iname += "_friendly_main";
|
iname += "_friendly_main";
|
||||||
|
|
||||||
CInterfaceGroup *inter = CInterfaceManager::getInstance()->getWindowFromId(iname);
|
CInterfaceGroup *inter = CWidgetManager::getInstance()->getWindowFromId(iname);
|
||||||
if (inter == NULL)
|
if (inter == NULL)
|
||||||
{
|
{
|
||||||
nlwarning ("cant find interface 's%'", iname.c_str());
|
nlwarning ("cant find interface 's%'", iname.c_str());
|
||||||
|
@ -1098,7 +1098,7 @@ void setFakeNews ()
|
||||||
iname += table[i];
|
iname += table[i];
|
||||||
iname += "_neutral_main";
|
iname += "_neutral_main";
|
||||||
|
|
||||||
CInterfaceGroup *inter = CInterfaceManager::getInstance()->getWindowFromId(iname);
|
CInterfaceGroup *inter = CWidgetManager::getInstance()->getWindowFromId(iname);
|
||||||
if (inter == NULL)
|
if (inter == NULL)
|
||||||
{
|
{
|
||||||
nlwarning ("cant find interface 's%'", iname.c_str());
|
nlwarning ("cant find interface 's%'", iname.c_str());
|
||||||
|
@ -1119,7 +1119,7 @@ void setFakeNews ()
|
||||||
iname += table[i];
|
iname += table[i];
|
||||||
iname += "_more_news";
|
iname += "_more_news";
|
||||||
|
|
||||||
CInterfaceGroup *inter = CInterfaceManager::getInstance()->getWindowFromId(iname);
|
CInterfaceGroup *inter = CWidgetManager::getInstance()->getWindowFromId(iname);
|
||||||
if (inter == NULL)
|
if (inter == NULL)
|
||||||
{
|
{
|
||||||
nlwarning ("cant find interface 's%'", iname.c_str());
|
nlwarning ("cant find interface 's%'", iname.c_str());
|
||||||
|
@ -1230,7 +1230,7 @@ void impulseBotChatSetInterface(NLMISC::CBitMemStream &impulse)
|
||||||
*/
|
*/
|
||||||
// TEMP FOR THE DEMO, DON'T USE THE NETWORK NEW BUT SELECT A NEWS HERE
|
// TEMP FOR THE DEMO, DON'T USE THE NETWORK NEW BUT SELECT A NEWS HERE
|
||||||
/*
|
/*
|
||||||
CInterfaceGroup *inter = CInterfaceManager::getInstance()->getWindowFromId("ui:interface:bot_chat_intro");
|
CInterfaceGroup *inter = CWidgetManager::getInstance()->getWindowFromId("ui:interface:bot_chat_intro");
|
||||||
nlassert (inter != NULL);
|
nlassert (inter != NULL);
|
||||||
inter->setActive(true);
|
inter->setActive(true);
|
||||||
|
|
||||||
|
@ -1254,7 +1254,7 @@ void impulseBotChatSetInterface(NLMISC::CBitMemStream &impulse)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CInterfaceGroup *inter = CInterfaceManager::getInstance()->getWindowFromId(interfaceName);
|
CInterfaceGroup *inter = CWidgetManager::getInstance()->getWindowFromId(interfaceName);
|
||||||
if (inter == NULL)
|
if (inter == NULL)
|
||||||
{
|
{
|
||||||
nlwarning ("Can't find interface name '%s' %d", interfaceName.c_str(), interfaceId);
|
nlwarning ("Can't find interface name '%s' %d", interfaceName.c_str(), interfaceId);
|
||||||
|
@ -1715,10 +1715,10 @@ void impulseTeamShareOpen(NLMISC::CBitMemStream &impulse)
|
||||||
{
|
{
|
||||||
if (PermanentlyBanned) return;
|
if (PermanentlyBanned) return;
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer*>( im->getElementFromId("ui:interface:team_share"));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer*>( CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share"));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->updateCoords();
|
gc->updateCoords();
|
||||||
gc->center();
|
gc->center();
|
||||||
}// impulseTeamShareOpen //
|
}// impulseTeamShareOpen //
|
||||||
|
@ -1734,7 +1734,7 @@ void impulseTeamShareInvalid(NLMISC::CBitMemStream &impulse)
|
||||||
{
|
{
|
||||||
if (PermanentlyBanned) return;
|
if (PermanentlyBanned) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:team_share:content:ok"));
|
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share:content:ok"));
|
||||||
if (pTB != NULL)
|
if (pTB != NULL)
|
||||||
pTB->setActive(true);
|
pTB->setActive(true);
|
||||||
}// impulseTeamShareInvalid //
|
}// impulseTeamShareInvalid //
|
||||||
|
@ -1748,10 +1748,10 @@ void impulseTeamShareClose(NLMISC::CBitMemStream &impulse)
|
||||||
if (PermanentlyBanned) return;
|
if (PermanentlyBanned) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer
|
CGroupContainer
|
||||||
*pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:team_share"));
|
*pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share"));
|
||||||
if (pGC != NULL)
|
if (pGC != NULL)
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:team_share:content:ok"));
|
CCtrlTextButton *pTB = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:team_share:content:ok"));
|
||||||
if (pTB != NULL)
|
if (pTB != NULL)
|
||||||
pTB->setActive(true);
|
pTB->setActive(true);
|
||||||
}// impulseTeamShareClose //
|
}// impulseTeamShareClose //
|
||||||
|
@ -1932,13 +1932,13 @@ void impulseGuildJoinProposal(NLMISC::CBitMemStream &impulse)
|
||||||
CGuildManager::getInstance()->launchJoinProposal(phraseID);
|
CGuildManager::getInstance()->launchJoinProposal(phraseID);
|
||||||
/*//activate the pop up window
|
/*//activate the pop up window
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>( im->getElementFromId("ui:interface:join_guild_proposal"));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>( CWidgetManager::getInstance()->getElementFromId("ui:interface:join_guild_proposal"));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
CViewText *vt = dynamic_cast<CViewText*>(gc->getView("invitor_name"));
|
CViewText *vt = dynamic_cast<CViewText*>(gc->getView("invitor_name"));
|
||||||
if (vt == NULL) return;
|
if (vt == NULL) return;
|
||||||
vt->setText(invitor);
|
vt->setText(invitor);
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->updateCoords();
|
gc->updateCoords();
|
||||||
gc->center();
|
gc->center();
|
||||||
gc->enableBlink(2);*/
|
gc->enableBlink(2);*/
|
||||||
|
@ -1975,13 +1975,13 @@ void impulseEnterCrZoneProposal(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *im = CInterfaceManager::getInstance();
|
CInterfaceManager *im = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *gc = dynamic_cast<CGroupContainer *>( im->getElementFromId("ui:interface:enter_crzone_proposal"));
|
CGroupContainer *gc = dynamic_cast<CGroupContainer *>( CWidgetManager::getInstance()->getElementFromId("ui:interface:enter_crzone_proposal"));
|
||||||
if (!gc) return;
|
if (!gc) return;
|
||||||
CViewTextID *vti = dynamic_cast<CViewTextID *>(gc->getView("phrase"));
|
CViewTextID *vti = dynamic_cast<CViewTextID *>(gc->getView("phrase"));
|
||||||
if (!vti) return;
|
if (!vti) return;
|
||||||
vti->setTextId(phraseID);
|
vti->setTextId(phraseID);
|
||||||
gc->setActive(true);
|
gc->setActive(true);
|
||||||
im->setTopWindow(gc);
|
CWidgetManager::getInstance()->setTopWindow(gc);
|
||||||
gc->updateCoords();
|
gc->updateCoords();
|
||||||
gc->center();
|
gc->center();
|
||||||
gc->enableBlink(2);
|
gc->enableBlink(2);
|
||||||
|
@ -1995,7 +1995,7 @@ void impulseCloseEnterCrZoneProposal(NLMISC::CBitMemStream &impulse)
|
||||||
{
|
{
|
||||||
// hide interface
|
// hide interface
|
||||||
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
CInterfaceManager* pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceGroup *pIG = (CInterfaceGroup*)pIM->getElementFromId ("ui:interface:enter_crzone_proposal");
|
CInterfaceGroup *pIG = (CInterfaceGroup*)CWidgetManager::getInstance()->getElementFromId ("ui:interface:enter_crzone_proposal");
|
||||||
if(pIG)
|
if(pIG)
|
||||||
pIG->setActive(false);
|
pIG->setActive(false);
|
||||||
}// impulseCloseEnterCrZoneProposal //
|
}// impulseCloseEnterCrZoneProposal //
|
||||||
|
@ -2012,14 +2012,14 @@ void impulseExchangeInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
CInterfaceManager* iMngr = CInterfaceManager::getInstance();
|
CInterfaceManager* iMngr = CInterfaceManager::getInstance();
|
||||||
|
|
||||||
// show the modal window that allow the player to accept / decline the invitation
|
// show the modal window that allow the player to accept / decline the invitation
|
||||||
CGroupContainer *wnd = dynamic_cast<CGroupContainer *>(iMngr->getElementFromId(PLAYER_EXCHANGE_INVITATION_DIALOG));
|
CGroupContainer *wnd = dynamic_cast<CGroupContainer *>(CWidgetManager::getInstance()->getElementFromId(PLAYER_EXCHANGE_INVITATION_DIALOG));
|
||||||
if (wnd)
|
if (wnd)
|
||||||
{
|
{
|
||||||
wnd->setActive(true);
|
wnd->setActive(true);
|
||||||
wnd->updateCoords();
|
wnd->updateCoords();
|
||||||
wnd->center();
|
wnd->center();
|
||||||
wnd->enableBlink(2);
|
wnd->enableBlink(2);
|
||||||
iMngr->setTopWindow(wnd);
|
CWidgetManager::getInstance()->setTopWindow(wnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
CViewTextID *vti = dynamic_cast<CViewTextID *>(wnd->getView("invite_phrase"));
|
CViewTextID *vti = dynamic_cast<CViewTextID *>(wnd->getView("invite_phrase"));
|
||||||
|
@ -2038,7 +2038,7 @@ void impulseExchangeCloseInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
if (PermanentlyBanned) return;
|
if (PermanentlyBanned) return;
|
||||||
CInterfaceManager* iMngr = CInterfaceManager::getInstance();
|
CInterfaceManager* iMngr = CInterfaceManager::getInstance();
|
||||||
// hide the modal window that allow the player to accept / decline the invitation
|
// hide the modal window that allow the player to accept / decline the invitation
|
||||||
CInterfaceGroup *wnd = dynamic_cast<CInterfaceGroup *>(iMngr->getElementFromId(PLAYER_EXCHANGE_INVITATION_DIALOG));
|
CInterfaceGroup *wnd = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId(PLAYER_EXCHANGE_INVITATION_DIALOG));
|
||||||
if (wnd) wnd->setActive(false);
|
if (wnd) wnd->setActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2310,7 +2310,7 @@ void impulseBotChatForceEnd(NLMISC::CBitMemStream &impulse)
|
||||||
CGroupContainer *getMissionCompletedContainer()
|
CGroupContainer *getMissionCompletedContainer()
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *pIE = pIM->getElementFromId(MC_M_CONTAINER);
|
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId(MC_M_CONTAINER);
|
||||||
CGroupContainer *pGCM = dynamic_cast<CGroupContainer*>(pIE);
|
CGroupContainer *pGCM = dynamic_cast<CGroupContainer*>(pIE);
|
||||||
if (pGCM == NULL) return NULL;
|
if (pGCM == NULL) return NULL;
|
||||||
|
|
||||||
|
@ -2899,7 +2899,7 @@ void impulseDeathRespawnPoint (NLMISC::CBitMemStream &impulse)
|
||||||
impulse.serial(msg);
|
impulse.serial(msg);
|
||||||
if (PermanentlyBanned) return;
|
if (PermanentlyBanned) return;
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:respawn_map:content:map_content:actual_map"));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("problem cannot find ui:interface:respawn_map:content:map_content:actual_map");
|
nlwarning("problem cannot find ui:interface:respawn_map:content:map_content:actual_map");
|
||||||
|
@ -2908,7 +2908,7 @@ void impulseDeathRespawnPoint (NLMISC::CBitMemStream &impulse)
|
||||||
pMap->addRespawnPoints(msg);
|
pMap->addRespawnPoints(msg);
|
||||||
|
|
||||||
|
|
||||||
pMap = dynamic_cast<CGroupMap*>(pIM->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
if (pMap == NULL)
|
if (pMap == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("problem cannot find ui:interface:map:content:map_content:actual_map");
|
nlwarning("problem cannot find ui:interface:map:content:map_content:actual_map");
|
||||||
|
@ -2938,13 +2938,13 @@ void impulseDuelInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_duel_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_duel_proposal"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
CViewTextID *pVTID = dynamic_cast<CViewTextID *>(pGC->getView("invitor_name"));
|
CViewTextID *pVTID = dynamic_cast<CViewTextID *>(pGC->getView("invitor_name"));
|
||||||
if (pVTID == NULL) return;
|
if (pVTID == NULL) return;
|
||||||
pVTID->setTextId(textID);
|
pVTID->setTextId(textID);
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
pGC->updateCoords();
|
pGC->updateCoords();
|
||||||
pGC->center();
|
pGC->center();
|
||||||
pGC->enableBlink(2);
|
pGC->enableBlink(2);
|
||||||
|
@ -2961,7 +2961,7 @@ void impulseDuelCancelInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_duel_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_duel_proposal"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
|
|
||||||
|
@ -2981,13 +2981,13 @@ void impulsePVPChallengeInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_pvp_challenge_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_challenge_proposal"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
CViewTextID *pVTID = dynamic_cast<CViewTextID *>(pGC->getView("invitor_name"));
|
CViewTextID *pVTID = dynamic_cast<CViewTextID *>(pGC->getView("invitor_name"));
|
||||||
if (pVTID == NULL) return;
|
if (pVTID == NULL) return;
|
||||||
pVTID->setTextId(textID);
|
pVTID->setTextId(textID);
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
pGC->updateCoords();
|
pGC->updateCoords();
|
||||||
pGC->center();
|
pGC->center();
|
||||||
pGC->enableBlink(2);
|
pGC->enableBlink(2);
|
||||||
|
@ -3003,7 +3003,7 @@ void impulsePVPChallengeCancelInvitation(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_pvp_challenge_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_challenge_proposal"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
|
|
||||||
|
@ -3075,16 +3075,16 @@ void impulsePVPChooseClan(NLMISC::CBitMemStream &impulse)
|
||||||
|
|
||||||
//activate the pop up window
|
//activate the pop up window
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_pvp_clan_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_clan_proposal"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
|
|
||||||
CCtrlTextButton * butClan1 = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan1"));
|
CCtrlTextButton * butClan1 = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan1"));
|
||||||
if( butClan1 == NULL )
|
if( butClan1 == NULL )
|
||||||
return;
|
return;
|
||||||
butClan1->setText( ucstring(EGSPD::CPeople::toString( clan1 )) );
|
butClan1->setText( ucstring(EGSPD::CPeople::toString( clan1 )) );
|
||||||
|
|
||||||
CCtrlTextButton * butClan2 = dynamic_cast<CCtrlTextButton*>(pIM->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan2"));
|
CCtrlTextButton * butClan2 = dynamic_cast<CCtrlTextButton*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_clan_proposal:content:clan2"));
|
||||||
if( butClan2 == NULL )
|
if( butClan2 == NULL )
|
||||||
return;
|
return;
|
||||||
butClan2->setText( ucstring(EGSPD::CPeople::toString( clan2 )) );
|
butClan2->setText( ucstring(EGSPD::CPeople::toString( clan2 )) );
|
||||||
|
@ -3137,7 +3137,7 @@ void impulseItemCloseRoomInventory(NLMISC::CBitMemStream &impulse)
|
||||||
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(0);
|
NLGUI::CDBManager::getInstance()->getDbProp("UI:TEMP:INVENTORY_ROOM_OPENED")->setValue32(0);
|
||||||
|
|
||||||
// deactivate the pop up window
|
// deactivate the pop up window
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:inv_room"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:inv_room"));
|
||||||
if (pGC == NULL) return;
|
if (pGC == NULL) return;
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
}
|
}
|
||||||
|
@ -3297,16 +3297,16 @@ private:
|
||||||
string group = titleStr.toString();
|
string group = titleStr.toString();
|
||||||
// <missing:XXX>
|
// <missing:XXX>
|
||||||
group = group.substr(9, group.size()-10);
|
group = group.substr(9, group.size()-10);
|
||||||
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:"+group+":content:html"));
|
groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:"+group+":content:html"));
|
||||||
if (!groupHtml)
|
if (!groupHtml)
|
||||||
{
|
{
|
||||||
groupHtml = dynamic_cast<CGroupHTML*>(pIM->getElementFromId("ui:interface:webig:content:html"));
|
groupHtml = dynamic_cast<CGroupHTML*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:webig:content:html"));
|
||||||
group = "webig";
|
group = "webig";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (groupHtml)
|
if (groupHtml)
|
||||||
{
|
{
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:"+group));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:"+group));
|
||||||
if (pGC)
|
if (pGC)
|
||||||
{
|
{
|
||||||
if (contentStr.empty())
|
if (contentStr.empty())
|
||||||
|
@ -3320,14 +3320,14 @@ private:
|
||||||
string url = contentStr.toString();
|
string url = contentStr.toString();
|
||||||
addWebIGParams(url, true);
|
addWebIGParams(url, true);
|
||||||
groupHtml->browse(url.c_str());
|
groupHtml->browse(url.c_str());
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:server_message_box"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:server_message_box"));
|
||||||
if (pGC)
|
if (pGC)
|
||||||
{
|
{
|
||||||
// show the window with correct width
|
// show the window with correct width
|
||||||
|
@ -3335,12 +3335,12 @@ private:
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
|
|
||||||
// must set the text by hand
|
// must set the text by hand
|
||||||
CViewText *vt= dynamic_cast<CViewText*>(pIM->getElementFromId(pIM->getDefine("server_message_box_content_view_text")));
|
CViewText *vt= dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(pIM->getDefine("server_message_box_content_view_text")));
|
||||||
if(vt)
|
if(vt)
|
||||||
vt->setTextFormatTaged(contentStr);
|
vt->setTextFormatTaged(contentStr);
|
||||||
|
|
||||||
// open
|
// open
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
pGC->invalidateCoords();
|
pGC->invalidateCoords();
|
||||||
// Yoyo: because of buggued group container, I found that 6 times is a good number....
|
// Yoyo: because of buggued group container, I found that 6 times is a good number....
|
||||||
for(uint i=0;i<6;i++)
|
for(uint i=0;i<6;i++)
|
||||||
|
|
|
@ -58,11 +58,11 @@ void COutpostManager::startPvpJoinProposal(bool playerGuildInConflict, bool play
|
||||||
if(node) node->setValue32(_EndTickForPvpJoinProposal);
|
if(node) node->setValue32(_EndTickForPvpJoinProposal);
|
||||||
|
|
||||||
// open Popup
|
// open Popup
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_pvp_outpost_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal"));
|
||||||
if (pGC)
|
if (pGC)
|
||||||
{
|
{
|
||||||
pGC->setActive(true);
|
pGC->setActive(true);
|
||||||
pIM->setTopWindow(pGC);
|
CWidgetManager::getInstance()->setTopWindow(pGC);
|
||||||
pGC->updateCoords();
|
pGC->updateCoords();
|
||||||
pGC->updateCoords();
|
pGC->updateCoords();
|
||||||
pGC->center();
|
pGC->center();
|
||||||
|
@ -108,7 +108,7 @@ void COutpostManager::update()
|
||||||
pIM->runActionHandler("outpost_pvp_join", NULL, "neutral");
|
pIM->runActionHandler("outpost_pvp_join", NULL, "neutral");
|
||||||
|
|
||||||
// close the window
|
// close the window
|
||||||
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(pIM->getElementFromId("ui:interface:join_pvp_outpost_proposal"));
|
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal"));
|
||||||
if (pGC)
|
if (pGC)
|
||||||
pGC->setActive(false);
|
pGC->setActive(false);
|
||||||
|
|
||||||
|
|
|
@ -683,7 +683,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle *
|
||||||
// display the new title in player interface
|
// display the new title in player interface
|
||||||
if (_Slot == 0)
|
if (_Slot == 0)
|
||||||
{
|
{
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(IM->getElementFromId("ui:interface:player:header_opened:player_title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
|
||||||
if (pVT != NULL) pVT->setText(_Title);
|
if (pVT != NULL) pVT->setText(_Title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -442,7 +442,7 @@ void CDisplayerVisual::onPostRender()
|
||||||
{
|
{
|
||||||
// Link to the interface
|
// Link to the interface
|
||||||
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
CWidgetManager::getInstance()->addWindowToMasterGroup("ui:interface", group);
|
||||||
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface"));
|
CInterfaceGroup *pRoot = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface"));
|
||||||
group->setParent(pRoot);
|
group->setParent(pRoot);
|
||||||
if (pRoot)
|
if (pRoot)
|
||||||
pRoot->addGroup (group);
|
pRoot->addGroup (group);
|
||||||
|
|
|
@ -615,7 +615,7 @@ void CEditor::clearDebugWindow()
|
||||||
//H_AUTO(R2_CEditor_clearDebugWindow)
|
//H_AUTO(R2_CEditor_clearDebugWindow)
|
||||||
CHECK_EDITOR
|
CHECK_EDITOR
|
||||||
getUI().flushDebugWindow();
|
getUI().flushDebugWindow();
|
||||||
CGroupList *gl = dynamic_cast<CGroupList *>(getUI().getElementFromId("ui:interface:debug_info:content:cb:text_list"));
|
CGroupList *gl = dynamic_cast<CGroupList *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:debug_info:content:cb:text_list"));
|
||||||
if (gl)
|
if (gl)
|
||||||
{
|
{
|
||||||
gl->deleteAllChildren();
|
gl->deleteAllChildren();
|
||||||
|
@ -1648,11 +1648,11 @@ void CEditor::waitScenarioScreen()
|
||||||
setMode(GoingToEditionMode);
|
setMode(GoingToEditionMode);
|
||||||
}
|
}
|
||||||
getUI().hideAllWindows();
|
getUI().hideAllWindows();
|
||||||
CInterfaceGroup *waitScreen = dynamic_cast<CInterfaceGroup *>(getUI().getElementFromId("ui:interface:r2ed_connecting"));
|
CInterfaceGroup *waitScreen = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_connecting"));
|
||||||
if (waitScreen)
|
if (waitScreen)
|
||||||
{
|
{
|
||||||
waitScreen->setActive(true);
|
waitScreen->setActive(true);
|
||||||
getUI().setTopWindow(waitScreen);
|
CWidgetManager::getInstance()->setTopWindow(waitScreen);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
enum TState { WaitingScenario, WaitingTP, DoExit };
|
enum TState { WaitingScenario, WaitingTP, DoExit };
|
||||||
|
@ -1669,7 +1669,7 @@ void CEditor::waitScenarioScreen()
|
||||||
loadBackgroundBitmap (StartBackground);
|
loadBackgroundBitmap (StartBackground);
|
||||||
|
|
||||||
// patch for the 'sys info that pop' prb (cause unknown for now ...)
|
// patch for the 'sys info that pop' prb (cause unknown for now ...)
|
||||||
CInterfaceElement *sysInfo = getUI().getElementFromId("ui:interface:system_info");
|
CInterfaceElement *sysInfo = CWidgetManager::getInstance()->getElementFromId("ui:interface:system_info");
|
||||||
bool sysInfoActive = false;
|
bool sysInfoActive = false;
|
||||||
if (sysInfo) sysInfoActive = sysInfo->getActive();
|
if (sysInfo) sysInfoActive = sysInfo->getActive();
|
||||||
|
|
||||||
|
@ -1718,7 +1718,7 @@ void CEditor::waitScenarioScreen()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Display the firewall alert string
|
// Display the firewall alert string
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(getUI().getElementFromId("ui:interface:r2ed_connecting:title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_connecting:title"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiFirewallAlert")+ucstring("..."));
|
pVT->setText(CI18N::get("uiFirewallAlert")+ucstring("..."));
|
||||||
|
|
||||||
|
@ -1767,7 +1767,7 @@ void CEditor::waitScenarioScreen()
|
||||||
|
|
||||||
if (waitScreen)
|
if (waitScreen)
|
||||||
{
|
{
|
||||||
getUI().setTopWindow(waitScreen);
|
CWidgetManager::getInstance()->setTopWindow(waitScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sysInfo) sysInfo->setActive(false);
|
if (sysInfo) sysInfo->setActive(false);
|
||||||
|
@ -1807,7 +1807,7 @@ void CEditor::waitScenarioScreen()
|
||||||
if ( firewallTimeout )
|
if ( firewallTimeout )
|
||||||
{
|
{
|
||||||
// Display the firewall error string instead of the normal failure string
|
// Display the firewall error string instead of the normal failure string
|
||||||
CViewText *pVT = dynamic_cast<CViewText*>(getUI().getElementFromId("ui:interface:r2ed_connecting:title"));
|
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_connecting:title"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
{
|
{
|
||||||
pVT->setMultiLine( true );
|
pVT->setMultiLine( true );
|
||||||
|
@ -2350,7 +2350,7 @@ void CEditor::setMode(TMode mode)
|
||||||
ContextCur.release();
|
ContextCur.release();
|
||||||
_Mode = mode;
|
_Mode = mode;
|
||||||
loadKeySet(getKeySetPrefix(_Mode));
|
loadKeySet(getKeySetPrefix(_Mode));
|
||||||
getUI().disableModalWindow();
|
CWidgetManager::getInstance()->disableModalWindow();
|
||||||
getUI().setCapturePointerLeft(NULL);
|
getUI().setCapturePointerLeft(NULL);
|
||||||
getUI().setCapturePointerRight(NULL);
|
getUI().setCapturePointerRight(NULL);
|
||||||
getUI().setCaptureKeyboard(NULL);
|
getUI().setCaptureKeyboard(NULL);
|
||||||
|
@ -2578,7 +2578,7 @@ void CEditor::hideRingWindows()
|
||||||
for (uint k = 0; k < sizeofarray(ringWindows); ++k)
|
for (uint k = 0; k < sizeofarray(ringWindows); ++k)
|
||||||
{
|
{
|
||||||
std::string id = "ui:interface:" + std::string(ringWindows[k]);
|
std::string id = "ui:interface:" + std::string(ringWindows[k]);
|
||||||
CInterfaceElement *grp = getUI().getElementFromId(id);
|
CInterfaceElement *grp = CWidgetManager::getInstance()->getElementFromId(id);
|
||||||
if (grp)
|
if (grp)
|
||||||
{
|
{
|
||||||
grp->setActive(false);
|
grp->setActive(false);
|
||||||
|
@ -5191,7 +5191,7 @@ void CEditor::onEditionModeConnected( uint32 userSlotId, uint32 adventureId, COb
|
||||||
{
|
{
|
||||||
setMode(EditionMode);
|
setMode(EditionMode);
|
||||||
}
|
}
|
||||||
CInterfaceGroup *currentSessionGroup = dynamic_cast<CInterfaceGroup *>(getUI().getElementFromId("ui:interface:r2ed_current_session"));
|
CInterfaceGroup *currentSessionGroup = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_current_session"));
|
||||||
if (currentSessionGroup)
|
if (currentSessionGroup)
|
||||||
{
|
{
|
||||||
CViewText *text = dynamic_cast<CViewText *>(currentSessionGroup->getView("current_session"));
|
CViewText *text = dynamic_cast<CViewText *>(currentSessionGroup->getView("current_session"));
|
||||||
|
@ -5242,7 +5242,7 @@ void CEditor::onAnimationModeConnected(const CClientMessageAdventureUserConnecti
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CInterfaceGroup *currentSessionGroup = dynamic_cast<CInterfaceGroup *>(getUI().getElementFromId("ui:interface:r2ed_current_session"));
|
CInterfaceGroup *currentSessionGroup = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_current_session"));
|
||||||
if (currentSessionGroup)
|
if (currentSessionGroup)
|
||||||
{
|
{
|
||||||
CViewText *text = dynamic_cast<CViewText *>(currentSessionGroup->getView("current_session"));
|
CViewText *text = dynamic_cast<CViewText *>(currentSessionGroup->getView("current_session"));
|
||||||
|
@ -6386,7 +6386,7 @@ void CEditor::connexionMsg(const std::string &stringId)
|
||||||
// ignore if current ui desktop is not the third
|
// ignore if current ui desktop is not the third
|
||||||
if (getUI().getMode() != 3) return;
|
if (getUI().getMode() != 3) return;
|
||||||
// show the connection window
|
// show the connection window
|
||||||
CInterfaceGroup *r2ConnectWindow = dynamic_cast<CInterfaceGroup *>(getUI().getElementFromId("ui:interface:r2ed_connect"));
|
CInterfaceGroup *r2ConnectWindow = dynamic_cast<CInterfaceGroup *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_connect"));
|
||||||
if (!r2ConnectWindow) return;
|
if (!r2ConnectWindow) return;
|
||||||
if (stringId.empty())
|
if (stringId.empty())
|
||||||
{
|
{
|
||||||
|
@ -7330,9 +7330,9 @@ class CAHOpenScenarioControl : public IActionHandler
|
||||||
CInterfaceGroup* wnd = NULL;
|
CInterfaceGroup* wnd = NULL;
|
||||||
|
|
||||||
if(!R2::getEditor().isInitialized())
|
if(!R2::getEditor().isInitialized())
|
||||||
wnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:ring_scenario_loading_window"));
|
wnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:ring_scenario_loading_window"));
|
||||||
else
|
else
|
||||||
wnd = dynamic_cast<CInterfaceGroup*>(pIM->getElementFromId("ui:interface:r2ed_scenario_control"));
|
wnd = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_scenario_control"));
|
||||||
|
|
||||||
if(wnd)
|
if(wnd)
|
||||||
{
|
{
|
||||||
|
@ -7425,7 +7425,7 @@ class CAHInviteCharacter : public IActionHandler
|
||||||
|
|
||||||
if(sessionBrowser._LastInvokeResult == 14)
|
if(sessionBrowser._LastInvokeResult == 14)
|
||||||
{
|
{
|
||||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
|
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ CNPCEditor::~CNPCEditor()
|
||||||
void CNPCEditor::updateNPCView(uint slot)
|
void CNPCEditor::updateNPCView(uint slot)
|
||||||
{
|
{
|
||||||
_NPCWindow = dynamic_cast<CGroupContainer *>(
|
_NPCWindow = dynamic_cast<CGroupContainer *>(
|
||||||
CEditor::getUI().getElementFromId("ui:interface:r2ed_npc"));
|
CWidgetManager::getInstance()->getElementFromId("ui:interface:r2ed_npc"));
|
||||||
if (!_NPCWindow)
|
if (!_NPCWindow)
|
||||||
{
|
{
|
||||||
nlwarning("<CNPCEditor::updateNPCView> can't retrieve npc window, or bad type");
|
nlwarning("<CNPCEditor::updateNPCView> can't retrieve npc window, or bad type");
|
||||||
|
|
|
@ -155,7 +155,7 @@ uint32 CTool::getScreenHeight()
|
||||||
void CTool::getMousePos(sint32 &x, sint32 &y)
|
void CTool::getMousePos(sint32 &x, sint32 &y)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CTool_getMousePos)
|
//H_AUTO(R2_CTool_getMousePos)
|
||||||
CViewPointer *cursor = getUI().getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor == NULL)
|
if(cursor == NULL)
|
||||||
{
|
{
|
||||||
x = y = -1;
|
x = y = -1;
|
||||||
|
@ -198,7 +198,7 @@ CGroupMap *CTool::getWorldMap()
|
||||||
static volatile bool cacheTest = true;
|
static volatile bool cacheTest = true;
|
||||||
if (!mapPtr || !cacheTest)
|
if (!mapPtr || !cacheTest)
|
||||||
{
|
{
|
||||||
mapPtr = dynamic_cast<CGroupMap*>(getUI().getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
mapPtr = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
}
|
}
|
||||||
return mapPtr;
|
return mapPtr;
|
||||||
}
|
}
|
||||||
|
@ -752,7 +752,7 @@ bool CTool::isMouseCaptured()
|
||||||
void CTool::setMouseCursor(const char *cursorTexture)
|
void CTool::setMouseCursor(const char *cursorTexture)
|
||||||
{
|
{
|
||||||
//H_AUTO(R2_CTool_setMouseCursor)
|
//H_AUTO(R2_CTool_setMouseCursor)
|
||||||
CViewPointer *cursor = getUI().getPointer();
|
CViewPointer *cursor = CWidgetManager::getInstance()->getPointer();
|
||||||
if(cursor)
|
if(cursor)
|
||||||
{
|
{
|
||||||
cursor->setCursor(cursorTexture);
|
cursor->setCursor(cursorTexture);
|
||||||
|
|
|
@ -219,7 +219,7 @@ int CSessionBrowserImpl::luaJoinRingSession(CLuaState &ls)
|
||||||
|
|
||||||
if(sessionBrowser._LastJoinSessionResult == 20)
|
if(sessionBrowser._LastJoinSessionResult == 20)
|
||||||
{
|
{
|
||||||
CViewText* pVT = dynamic_cast<CViewText*>(pIM->getElementFromId("ui:interface:warning_free_trial:text"));
|
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
|
||||||
if (pVT != NULL)
|
if (pVT != NULL)
|
||||||
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
|
||||||
pIM->runActionHandler("enter_modal", NULL, "group=ui:interface:warning_free_trial");
|
pIM->runActionHandler("enter_modal", NULL, "group=ui:interface:warning_free_trial");
|
||||||
|
|
|
@ -510,7 +510,7 @@ void CUserEntity::updateVisualPropertyName(const NLMISC::TGameCycle &gameCycle,
|
||||||
/* if (oldNameId != _NameId)
|
/* if (oldNameId != _NameId)
|
||||||
{
|
{
|
||||||
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
CInterfaceManager *pIM = CInterfaceManager::getInstance();
|
||||||
CInterfaceElement *element = pIM->getElementFromId("ui:interface:mailbox:content:html");
|
CInterfaceElement *element = CWidgetManager::getInstance()->getElementFromId("ui:interface:mailbox:content:html");
|
||||||
if (element)
|
if (element)
|
||||||
{
|
{
|
||||||
CGroupHTML *html = dynamic_cast<CGroupHTML*>(element);
|
CGroupHTML *html = dynamic_cast<CGroupHTML*>(element);
|
||||||
|
@ -2667,7 +2667,7 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
{
|
{
|
||||||
/*// Pvp Mode
|
/*// Pvp Mode
|
||||||
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(pIM->getElementFromId("ui:interface:target:pvp_tags:mode"));
|
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:target:pvp_tags:mode"));
|
||||||
if (tagMode)
|
if (tagMode)
|
||||||
{
|
{
|
||||||
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
||||||
|
@ -2679,7 +2679,7 @@ void CUserEntity::selection(const CLFECOMMON::TCLEntityId &slot) // virtual
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
/*// Pvp available actions (attack, heal, both)
|
/*// Pvp available actions (attack, heal, both)
|
||||||
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(pIM->getElementFromId("ui:interface:target:pvp_tags:actions"));
|
CViewBitmap * tagMode = dynamic_cast<CViewBitmap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:target:pvp_tags:actions"));
|
||||||
if (tagMode)
|
if (tagMode)
|
||||||
{
|
{
|
||||||
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
if (pPlayer->getPvpMode()&PVP_MODE::PvpFaction)
|
||||||
|
|
Loading…
Reference in a new issue