CHANGED: #1471 Moved CInterface::runActionHandler methods to CAHManager.

--HG--
branch : gui-refactoring
hg/feature/sse2
dfighter1985 13 years ago
parent d2c30f366d
commit 643ecb591e

@ -59,7 +59,7 @@ void CAction::runAction ()
CInterfaceManager *IM = CInterfaceManager::getInstance ();
if (IM)
{
IM->runActionHandler (Name.Name, NULL, Name.Argu);
CAHManager::getInstance()->runActionHandler (Name.Name, NULL, Name.Argu);
}
}

@ -1340,11 +1340,11 @@ NLMISC_COMMAND(ah, "Launch an action handler", "<ActionHandler> <AHparam>")
CInterfaceManager *pIM = CInterfaceManager::getInstance();
if (args.size() == 1)
{
pIM->runActionHandler(args[0], NULL);
CAHManager::getInstance()->runActionHandler(args[0], NULL);
}
else
{
pIM->runActionHandler(args[0], NULL, args[1]);
CAHManager::getInstance()->runActionHandler(args[0], NULL, args[1]);
}
return true;
@ -4016,14 +4016,14 @@ NLMISC_COMMAND(browse, "Browse a HTML document with the internal help web browse
{
if (args.size() != 1) return false;
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler("browse", NULL, "name=ui:interface:help_browser:content:html|url="+args[0]);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name=ui:interface:help_browser:content:html|url="+args[0]);
return true;
}
NLMISC_COMMAND(openRingWindow, "Browse the main page in the ring web browser.", "")
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler("browse", NULL, "name=ui:interface:r2ed_web_admin:content:admin_web_page|url="+RingMainURL);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name=ui:interface:r2ed_web_admin:content:admin_web_page|url="+RingMainURL);
return true;
}
@ -4031,7 +4031,7 @@ NLMISC_COMMAND(browseRingAdmin, "Browse a HTML document with the ring web browse
{
if (args.size() != 1) return false;
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler("browse", NULL, "name=ui:interface:r2ed_web_admin:content:admin_web_page|url="+args[0]);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name=ui:interface:r2ed_web_admin:content:admin_web_page|url="+args[0]);
return true;
}
@ -4129,13 +4129,13 @@ NLMISC_COMMAND(GUKick, "kick a member", "<player name>")
NLMISC_COMMAND(GUAccept, "accept an invitation", "")
{
CInterfaceManager::getInstance()->runActionHandler("accept_guild_invitation",NULL);
CAHManager::getInstance()->runActionHandler("accept_guild_invitation",NULL);
return true;
}
NLMISC_COMMAND(GURefuse, "refuse an invitation", "")
{
CInterfaceManager::getInstance()->runActionHandler("refuse_guild_invitation",NULL);
CAHManager::getInstance()->runActionHandler("refuse_guild_invitation",NULL);
return true;
}
@ -5296,7 +5296,7 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std:
}
// Run the action handler
pIM->runActionHandler (mode->Action, pIM->getOldCaptureKeyboard(), finalArgs);
CAHManager::getInstance()->runActionHandler (mode->Action, pIM->getOldCaptureKeyboard(), finalArgs);
}
else
{
@ -5763,7 +5763,7 @@ NLMISC_COMMAND(em, "emote command", "<emote phrase>")
emotePhrase += " ";
emotePhrase += args[i];
}
pIM->runActionHandler("emote", NULL, "nb=0|behav=255|custom_phrase="+emotePhrase);
CAHManager::getInstance()->runActionHandler("emote", NULL, "nb=0|behav=255|custom_phrase="+emotePhrase);
return true;
}
return false;

@ -1161,7 +1161,7 @@ TInterfaceState globalMenu()
}
// Auto-selection for fast launching (dev only)
pIM->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", ClientCfg.SelectCharacter));
CAHManager::getInstance()->runActionHandler("launch_game", NULL, toString("slot=%d|edit_mode=0", ClientCfg.SelectCharacter));
}
}
@ -2179,7 +2179,7 @@ public:
if (pCB != NULL)
{
pCB->setPushed(true);
pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
CAHManager::getInstance()->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
}
}
pList->invalidateCoords();
@ -2419,7 +2419,7 @@ public:
if (pCB != NULL)
{
pCB->setPushed(true);
pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
CAHManager::getInstance()->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
}
}
}
@ -3229,7 +3229,7 @@ class CAHLoadScenario : public IActionHandler
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
if (pVT != NULL)
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
return;
}
@ -3310,7 +3310,7 @@ class CAHLoadScenario : public IActionHandler
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
if (pVT != NULL)
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
}
@ -3339,7 +3339,7 @@ class CAHLoadScenario : public IActionHandler
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
if (pVT != NULL)
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
}
}
}

@ -890,7 +890,7 @@ void contextWebIG(bool rightClick, bool dblClick)
{
if (pGC != NULL)
pGC->setActive(false);
IM->runActionHandler("browse", NULL, "name=ui:interface:webig:content:html|url="+selectedInstanceURL);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name=ui:interface:webig:content:html|url="+selectedInstanceURL);
}
}// contextWebIG //

@ -519,7 +519,7 @@ void CLoginStateMachine::run()
// Far TP part 1.1: From the ingame main loop, the admin html box gives us an event ev_connect for the destination shard.
// Note: the admin html box is run by CInputHandlerManager::getInstance()->pumpEvents() in the main loop.
// Tip: to see where a co-task is resumed from, just add a breakpoint on the end of CCoTask::resume().
CInterfaceManager::getInstance()->runActionHandler("quit_ryzom", NULL, "");
CAHManager::getInstance()->runActionHandler("quit_ryzom", NULL, "");
if (!FarTP.isIngame()) // assumes there is no Far TP starting between char selection and main loop, see below
{
@ -859,8 +859,8 @@ retryJoinEdit:
if ( letReturnToCharSelect )
{
// // Hide all buttons except Quit. If !requestRetToMainland, we will show them back at the end of connectToNewShard().
// pIM->runActionHandler( "proc", NULL, "charsel_disable_buttons" );
// pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:quit_but:active|value=1" );
// CAHManager::getInstance()->runActionHandler( "proc", NULL, "charsel_disable_buttons" );
// CAHManager::getInstance()->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:quit_but:active|value=1" );
CInterfaceElement *btnOk = CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel:message_box:ok");
if (btnOk)
@ -926,12 +926,12 @@ retryJoinEdit:
else if ( letReturnToCharSelect )
{
// Show all buttons except 'New character' so that the character can retry entering game or choose another character.
pIM->runActionHandler( "proc", NULL, "charsel_enable_buttons" );
pIM->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:create_new_but:active|value=0" );
CAHManager::getInstance()->runActionHandler( "proc", NULL, "charsel_enable_buttons" );
CAHManager::getInstance()->runActionHandler( "set", NULL, "target_property=ui:outgame:charsel:create_new_but:active|value=0" );
CInterfaceGroup* charselGroup = dynamic_cast<CInterfaceGroup*>(CWidgetManager::getInstance()->getElementFromId("ui:outgame:charsel"));
if(charselGroup)
pIM->runActionHandler( "proc", charselGroup, "charsel_init_buttons" );
CAHManager::getInstance()->runActionHandler( "proc", charselGroup, "charsel_init_buttons" );
}
return false;

@ -201,6 +201,78 @@ void CAHManager::parseAH(xmlNodePtr cur, const char *ahId, const char *paramId,
}
}
// ------------------------------------------------------------------------------------------------
void CAHManager::runActionHandler (const string &ahCmdLine, CCtrlBase *pCaller, const string &ahUserParams)
{
if (ahCmdLine.empty()) return;
// Special AH form ("ah:params") ?
string::size_type i = ahCmdLine.find(':');
string ahName;
string ahParams;
if(i!=string::npos)
{
ahName= ahCmdLine.substr(0, i);
ahParams= ahCmdLine.substr(i+1);
}
else
{
ahName= ahCmdLine;
}
// Replace params if defined
if(!ahUserParams.empty())
ahParams= ahUserParams;
// Execute the action handler
map<string, IActionHandler*>::iterator it = FactoryMap.find (ahName);
if (it == FactoryMap.end())
{
nlwarning ("not found action handler : %s",ahName.c_str());
return;
}
IActionHandler *pAH = it->second;
pAH->execute (pCaller, ahParams);
// Quick Help
const string submitQuickHelp = "submit_quick_help";
it = FactoryMap.find(submitQuickHelp);
if(it == FactoryMap.end())
{
nlwarning ("not found action handler : %s", submitQuickHelp.c_str());
return;
}
pAH = it->second;
const std::string event = ahName + ":" + ahParams;
pAH->execute(NULL, event);
}
// ------------------------------------------------------------------------------------------------
void CAHManager::runActionHandler (IActionHandler *pAH, CCtrlBase *pCaller, const std::string &Params)
{
if (pAH == NULL)
{
nlwarning ("no action handler");
return;
}
pAH->execute (pCaller, Params);
string AHName = CAHManager::getInstance()->getAHName(pAH);
// Quick Help
const string submitQuickHelp = "submit_quick_help";
map<string, IActionHandler*>::iterator it = FactoryMap.find (AHName);
it = FactoryMap.find(submitQuickHelp);
if(it == FactoryMap.end())
{
nlwarning ("not found action handler : %s", submitQuickHelp.c_str());
return;
}
pAH = it->second;
const std::string event = AHName + ":" + Params;
pAH->execute(NULL, event);
}
// ------------------------------------------------------------------------------------------------
class CAHSet : public IActionHandler
{

@ -100,7 +100,10 @@ public:
void parseAH(xmlNodePtr cur, const char *ahId, const char *paramId, IActionHandler *&ahRet, class CStringShared &params);
/// Get the AH name from ptr
const std::string &getAHName(IActionHandler *pAH) { return getActionHandlerName(pAH); }
const std::string &getAHName(IActionHandler *pAH){ return getActionHandlerName(pAH); }
void runActionHandler(const std::string &AHName, CCtrlBase *pCaller, const std::string &Params=std::string("") );
void runActionHandler(IActionHandler *ah, CCtrlBase *pCaller, const std::string &Params=std::string("") );
private:
CAHManager(){}

@ -511,7 +511,7 @@ protected:
if (!_GroupEdit->getAHOnChange().empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_GroupEdit->getAHOnChange(), _GroupEdit, _GroupEdit->getParamsOnChange());
CAHManager::getInstance()->runActionHandler(_GroupEdit->getAHOnChange(), _GroupEdit, _GroupEdit->getParamsOnChange());
}
}
// else cut forwards
@ -524,7 +524,7 @@ protected:
if (!_GroupEdit->getAHOnChange().empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_GroupEdit->getAHOnChange(), _GroupEdit, _GroupEdit->getParamsOnChange());
CAHManager::getInstance()->runActionHandler(_GroupEdit->getAHOnChange(), _GroupEdit, _GroupEdit->getParamsOnChange());
}
}
// must stop selection in all case

@ -185,7 +185,7 @@ public:
{
ucstring name = CEntityCL::removeTitleAndShardFromName(selection->getEntityName());
if (name.empty()) return;
im->runActionHandler("enter_tell", pCaller, "player=" + name.toString());
CAHManager::getInstance()->runActionHandler("enter_tell", pCaller, "player=" + name.toString());
}
}
protected:
@ -942,7 +942,7 @@ public:
{
// directly launch the quit_team AH.
CInterfaceManager *pIM= CInterfaceManager::getInstance();
pIM->runActionHandler("quit_team",pCaller, sParams);
CAHManager::getInstance()->runActionHandler("quit_team",pCaller, sParams);
}
protected:
};
@ -1026,7 +1026,7 @@ public:
(typeProp != NULL) && (typeProp->getValue32() == ANIMAL_TYPE::Mount))
{
beastOrder("mount", toString(i+1)); // why +1 ? : dixit sendAnimalCommand in EGS : index 0 = all animals, 1 = animal 0 etc
pIM->runActionHandler("animal_target", NULL, toString(i+1));
CAHManager::getInstance()->runActionHandler("animal_target", NULL, toString(i+1));
UserEntity->moveTo(UserEntity->selection(),2.0,CUserEntity::None);
}
}
@ -1181,7 +1181,7 @@ public:
if(!FreeTrial)
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
pIM->runActionHandler("quit_ryzom", NULL);
CAHManager::getInstance()->runActionHandler("quit_ryzom", NULL);
}
}
};
@ -1232,7 +1232,7 @@ public:
{
// send a message to server, thru cancel cast
CInterfaceManager *pIM= CInterfaceManager::getInstance();
pIM->runActionHandler("phrase_cancel_cast", NULL);
CAHManager::getInstance()->runActionHandler("phrase_cancel_cast", NULL);
}
paying_account_request = false;
paying_account_already_request = false;
@ -1260,10 +1260,10 @@ public:
else
{
paying_account_already_request = true;
pIM->runActionHandler("quit_ryzom", NULL);
CAHManager::getInstance()->runActionHandler("quit_ryzom", NULL);
}
pIM->runActionHandler("leave_modal", NULL);
CAHManager::getInstance()->runActionHandler("leave_modal", NULL);
}
};
REGISTER_ACTION_HANDLER( CAHCloseFreeTrialQuitting, "close_free_trial_game_quitting");
@ -1509,7 +1509,7 @@ public:
string beastIndex;
if( CInterfaceExpr::evalAsString(getParam(Params,"beast_index"), beastIndex) )
{
pIM->runActionHandler("animal_target", NULL, beastIndex);
CAHManager::getInstance()->runActionHandler("animal_target", NULL, beastIndex);
}
// move to the beast
UserEntity->moveTo(UserEntity->selection(),3.0,CUserEntity::Mount);
@ -1889,7 +1889,7 @@ public:
pIG->setActive(true);
// browse the url
pIM->runActionHandler("browse", NULL, "name="+helpContainer+":content:html|url="+url);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name="+helpContainer+":content:html|url="+url);
}
};
REGISTER_ACTION_HANDLER( CAHLaunchHelp, "launch_help");
@ -2943,7 +2943,7 @@ public:
else
pBut->setPushed(true);
}
pIM->runActionHandler("game_config_change_vid_fullscreen",NULL);
CAHManager::getInstance()->runActionHandler("game_config_change_vid_fullscreen",NULL);
// **** Init Texture Size Modes
// init the combo box, according to Texture Installed or not
@ -3825,13 +3825,13 @@ void runMissionProc(sint32 nSelected)
{
string sButtonPath = UI_MISSION_LIST ":b_title"+toString(nSelected);
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(sButtonPath));
pIM->runActionHandler("proc", pCB, "mission_proc_title|"+toString(nSelected));
CAHManager::getInstance()->runActionHandler("proc", pCB, "mission_proc_title|"+toString(nSelected));
}
else if (nSelected < (nNbMission+nNbGroupMission))
{
string sButtonPath = UI_MISSION_LIST ":b_group_title"+toString(nSelected-nNbMission);
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(sButtonPath));
pIM->runActionHandler("proc", pCB, "group_mission_proc_title|"+toString(nSelected-nNbMission));
CAHManager::getInstance()->runActionHandler("proc", pCB, "group_mission_proc_title|"+toString(nSelected-nNbMission));
}
return;
}

@ -656,7 +656,7 @@ class CHandlerOpenTitleHelp : public IActionHandler
ucstring name = peopleList->getName(index);
if ( ! name.empty())
{
CInterfaceManager::getInstance()->runActionHandler("show_hide", pCaller, "profile|pname="+name.toUtf8()+"|ptype="+toString((int)CEntityCL::Player));
CAHManager::getInstance()->runActionHandler("show_hide", pCaller, "profile|pname="+name.toUtf8()+"|ptype="+toString((int)CEntityCL::Player));
}
return;
}
@ -697,7 +697,7 @@ class CHandlerOpenTitleHelp : public IActionHandler
}
}
if(!name.empty())
CInterfaceManager::getInstance()->runActionHandler("show_hide", pCaller, "profile|pname="+name.toUtf8()+"|ptype="+toString((int)selection->Type));
CAHManager::getInstance()->runActionHandler("show_hide", pCaller, "profile|pname="+name.toUtf8()+"|ptype="+toString((int)selection->Type));
return;
}
}
@ -994,7 +994,7 @@ class CHandlerBrowse : public IActionHandler
CInterfaceManager::parseTokens(ucparams);
params = ucparams.toUtf8();
// go. NB: the action handler himself may translate params from utf8
CInterfaceManager::getInstance()->runActionHandler(action, elementGroup, params);
CAHManager::getInstance()->runActionHandler(action, elementGroup, params);
// Next name
start = end+2;
@ -3913,7 +3913,7 @@ void updateStatReport ()
if ((ingameTime0 () <= time4StatReport) && (ingameTime1 () > time4StatReport))
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler ("proc", NULL, "proc_stat_report");
CAHManager::getInstance()->runActionHandler ("proc", NULL, "proc_stat_report");
}
}

@ -1498,7 +1498,7 @@ class CHandlerMoveItem : public IActionHandler
if (pLS->getSheet(i)->getSheetId() == 0)
{
// Send swap_item
pIM->runActionHandler("swap_item", pLS->getSheet(i), "src="+toString(pCaller->getId()));
CAHManager::getInstance()->runActionHandler("swap_item", pLS->getSheet(i), "src="+toString(pCaller->getId()));
return;
}
}
@ -1563,7 +1563,7 @@ class CHandlerMoveItem : public IActionHandler
(pCS->getSheetId() == 0) && pCS->canDropItem(item) && (!pCS->getGrayed()))
{
// Send swap_item
pIM->runActionHandler("swap_item", pCS, "src="+toString(pCaller->getId()));
CAHManager::getInstance()->runActionHandler("swap_item", pCS, "src="+toString(pCaller->getId()));
return;
}
}
@ -1597,7 +1597,7 @@ class CHandlerMoveItem : public IActionHandler
if ((pCS->canDropItem(item)) && (!pCS->getGrayed()))
{
// Send swap_item
pIM->runActionHandler("swap_item", pCS, "src="+toString(pCaller->getId()));
CAHManager::getInstance()->runActionHandler("swap_item", pCS, "src="+toString(pCaller->getId()));
return;
}
}
@ -1629,7 +1629,7 @@ class CHandlerDragNDrop : public IActionHandler
CDBCtrlSheet *pCSsrc = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sSrc));
CDBCtrlSheet *pCSdst = dynamic_cast<CDBCtrlSheet*>(CWidgetManager::getInstance()->getElementFromId(sDst));
if ((pCSdst == NULL) || (pCSsrc == NULL) || sAH.empty()) return;
pIM->runActionHandler(sAH, pCSdst, "src="+pCSsrc->getId());
CAHManager::getInstance()->runActionHandler(sAH, pCSdst, "src="+pCSsrc->getId());
}
};
REGISTER_ACTION_HANDLER( CHandlerDragNDrop, "drag_n_drop" );
@ -1657,7 +1657,7 @@ class CHandlerItemCristalEnchant : public IActionHandler
void execute (CCtrlBase *pCaller, const std::string &sParams)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("item_cristal_reload", pCaller, sParams);
CAHManager::getInstance()->runActionHandler("item_cristal_reload", pCaller, sParams);
}
};
REGISTER_ACTION_HANDLER( CHandlerItemCristalEnchant, "item_cristal_enchant" );

@ -180,7 +180,7 @@ public:
sendMsgToServer("OUTPOST:INSERT_SQUAD", getOutpostSheet(), nSquadSlot);
// Then set the selected squad at this place
pIM->runActionHandler("outpost_set_squad", pCaller, sParams);
CAHManager::getInstance()->runActionHandler("outpost_set_squad", pCaller, sParams);
}
};
REGISTER_ACTION_HANDLER(COutpostInsertSquad, "outpost_insert_squad");
@ -410,7 +410,7 @@ public:
node->setValue32(localToGmt(attPeriod));
// Nead to resend a Declare War Start (because wanted Att Hour changed)
pIM->runActionHandler("outpost_declare_war_start", pCaller);
CAHManager::getInstance()->runActionHandler("outpost_declare_war_start", pCaller);
}
};
REGISTER_ACTION_HANDLER(CAHOutpostSelectAttPeriod, "outpost_select_att_period");

@ -250,7 +250,7 @@ public:
{
// Act as if the player click on this button
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(button->getActionOnLeftClick(), button, button->getParamsOnLeftClick() );
CAHManager::getInstance()->runActionHandler(button->getActionOnLeftClick(), button, button->getParamsOnLeftClick() );
}
}
};
@ -721,7 +721,7 @@ public:
string mode = getParam(Params, "mode"); //default mode is copy
if (mode == "cut") //need delete src
{
CInterfaceManager::getInstance()->runActionHandler("forget_phrase_or_macro", ctrl);
CAHManager::getInstance()->runActionHandler("forget_phrase_or_macro", ctrl);
}
}
}
@ -895,7 +895,7 @@ void CHandlerMemorizePhraseOrMacro::execute (CCtrlBase *pCaller, const string &P
memorizePhraseOrMacro(dstMemoryIndex, srcIsMacro, srcPhraseId, srcMacroId);
// forget src (after shorctut change!)
pIM->runActionHandler("forget_phrase_or_macro", pCSSrc);
CAHManager::getInstance()->runActionHandler("forget_phrase_or_macro", pCSSrc);
}
}
}
@ -1273,9 +1273,9 @@ public:
{
// run the standard cast case.
if(ctrl->isMacro())
pIM->runActionHandler("cast_macro", ctrl);
CAHManager::getInstance()->runActionHandler("cast_macro", ctrl);
else
pIM->runActionHandler("cast_phrase", ctrl);
CAHManager::getInstance()->runActionHandler("cast_phrase", ctrl);
}
}
}
@ -1303,7 +1303,7 @@ public:
// if a phrase is on this slot, just cast the phrase
if(phraseId)
{
pIM->runActionHandler("cast_phrase", pCaller, Params);
CAHManager::getInstance()->runActionHandler("cast_phrase", pCaller, Params);
}
// else open the RightMenuEmpty, to have "NewAction"
else
@ -1339,7 +1339,7 @@ public:
CDBCtrlSheet *ctrl= dynamic_cast<CDBCtrlSheet*>(parent->getCtrl("ctrl_phrase"));
if(ctrl)
{
pIM->runActionHandler(ctrl->getActionOnRightClick(), ctrl, ctrl->getParamsOnRightClick());
CAHManager::getInstance()->runActionHandler(ctrl->getActionOnRightClick(), ctrl, ctrl->getParamsOnRightClick());
}
}

@ -233,9 +233,9 @@ class CAHUIPopupPopin : public IActionHandler
}
if (!isContainerAuthorized(pGC)) return;
if (pGC->isPopuped())
pIM->runActionHandler("popin", NULL, Params);
CAHManager::getInstance()->runActionHandler("popin", NULL, Params);
else
pIM->runActionHandler("popup", NULL, Params);
CAHManager::getInstance()->runActionHandler("popup", NULL, Params);
}
};
REGISTER_ACTION_HANDLER( CAHUIPopupPopin, "popup_popin" );
@ -561,7 +561,7 @@ class CAHTalkUntalk : public IActionHandler
double distanceSquare = pow(vect1.x-vect2.x,2) + pow(vect1.y-vect2.y,2);
if(distanceSquare <= MaxTalkingDistSquare)
{
pIM->runActionHandler("context_talk",NULL);
CAHManager::getInstance()->runActionHandler("context_talk",NULL);
}
}
}
@ -593,7 +593,7 @@ class CAHMountUnmount : public IActionHandler
else if(UserEntity->isRiding())
{
// We are currently mounted so unmount
pIM->runActionHandler("context_unseat",NULL);
CAHManager::getInstance()->runActionHandler("context_unseat",NULL);
}
// Not in combat mode.
else
@ -607,7 +607,7 @@ class CAHMountUnmount : public IActionHandler
if(distanceSquare <= MaxTalkingDistSquare)
{
// Ok lets mount
pIM->runActionHandler("context_mount",NULL);
CAHManager::getInstance()->runActionHandler("context_mount",NULL);
}
}
}
@ -638,7 +638,7 @@ class CAHExchange : public IActionHandler
{
if (selection && selection->properties().canExchangeItem())
if (!UserEntity->isBusy())
pIM->runActionHandler("context_exchange",NULL);
CAHManager::getInstance()->runActionHandler("context_exchange",NULL);
}
}
};

@ -1219,7 +1219,7 @@ public:
if( button && !button->getFrozen() )
{
// Act as if the player click on this button
pIM->runActionHandler("phrase_faber_validate", button );
CAHManager::getInstance()->runActionHandler("phrase_faber_validate", button );
}
}
};

@ -229,7 +229,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
{
if ((CCtrlBaseButton *) _LastLeftClickButton == this && (T1 - _LastLeftClickDate) < pIM->getUserDblClickDelay())
{
pIM->runActionHandler (_AHOnLeftDblClick, this, _AHLeftDblClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnLeftDblClick, this, _AHLeftDblClickParams);
_LeftDblClickHandled = true;
_LastLeftClickButton = NULL;
return true;
@ -279,7 +279,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
{
//nlinfo("clicked on %s", _Id.c_str());
pIM->submitEvent ("button_click:"+getId());//TEMP
pIM->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
//pIM->submitEvent ("button_click:"+getId());
}
*/
@ -316,7 +316,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
if(_AHOnRightClick != NULL)
{
handled= true;
pIM->runActionHandler (_AHOnRightClick, this, _AHRightClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnRightClick, this, _AHRightClickParams);
}
if (pIM->getCapturePointerRight() == NULL) return true; // if this become NULL, this ctrl has been deleted
// Run Menu
@ -339,7 +339,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
if (_AHOnClockTick != NULL)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnClockTick, this, _AHClockTickParams);
CAHManager::getInstance()->runActionHandler(_AHOnClockTick, this, _AHClockTickParams);
}
CInterfaceManager *pIM = CInterfaceManager::getInstance();
@ -355,7 +355,7 @@ bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event)
if ((T1 - _LeftLongClickDate) > repeatDelay)
{
_LeftLongClickHandled = true;
pIM->runActionHandler(_AHOnLeftLongClick, this, _AHLeftLongClickParams);
CAHManager::getInstance()->runActionHandler(_AHOnLeftLongClick, this, _AHLeftLongClickParams);
}
}
}
@ -504,7 +504,7 @@ void CCtrlBaseButton::runLeftClickAction()
//nlinfo("clicked on %s", _Id.c_str());
pIM->submitEvent ("button_click:"+getId());//TEMP
pIM->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
//pIM->submitEvent ("button_click:"+getId());
}
}

@ -224,7 +224,7 @@ void CCtrlButton::draw ()
{
if ((lastOver == false) && (_AHOnOver != NULL))
pIM->runActionHandler (_AHOnOver, this, _AHOverParams);
CAHManager::getInstance()->runActionHandler (_AHOnOver, this, _AHOverParams);
// the pointer is over the button
color= getCurrentColorOver(globalColor);

@ -187,7 +187,7 @@ void CCtrlColPick::selectColor (sint32 x, sint32 y)
_ColSelA.setSInt32(_ColorSelect.A);
if (!_AHOnChange.empty())
pIM->runActionHandler(_AHOnChange, this, _AHOnChangeParams);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _AHOnChangeParams);
}
// ------------------------------------------------------------------------------------------------

@ -70,7 +70,7 @@ void CCtrlScroll::runAH(const std::string &name, const std::string &params)
if (_CallingAH) return; // avoid infinite loop
CInterfaceManager *pIM = CInterfaceManager::getInstance();
_CallingAH = true;
pIM->runActionHandler(name, this, params);
CAHManager::getInstance()->runActionHandler(name, this, params);
_CallingAH = false;
}

@ -365,7 +365,7 @@ void CCtrlTextButton::draw ()
if (_Over && (_OverWhenPushed || !(_Pushed || pIM->getCapturePointerLeft() == this)))
{
if ((lastOver == false) && (_AHOnOver != NULL))
pIM->runActionHandler (_AHOnOver, this, _AHOverParams);
CAHManager::getInstance()->runActionHandler (_AHOnOver, this, _AHOverParams);
// the pointer is over the button.
color= getCurrentColorOver(globalColor);

@ -1881,7 +1881,7 @@ void CDBCtrlSheet::draw()
params = sTmp + "|" + params;
}
}
pIM->runActionHandler (_AHOnCanDrop, this, params);
CAHManager::getInstance()->runActionHandler (_AHOnCanDrop, this, params);
}
}
}
@ -2633,7 +2633,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
if (validClic && _AHOnCanDrag != NULL)
{
_TempCanDrag= true;
pIM->runActionHandler (_AHOnCanDrag, this, _AHCanDragParams);
CAHManager::getInstance()->runActionHandler (_AHOnCanDrag, this, _AHCanDragParams);
validClic= _TempCanDrag;
}
@ -2650,7 +2650,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
if (_AHOnDrag != NULL)
{
pIM->runActionHandler (_AHOnDrag, this, _AHDragParams);
CAHManager::getInstance()->runActionHandler (_AHOnDrag, this, _AHDragParams);
}
}
}
@ -2698,7 +2698,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
params = sTmp + "|" + params;
}
}
pIM->runActionHandler (pCSdest->_AHOnCanDrop, pCSdest, params);
CAHManager::getInstance()->runActionHandler (pCSdest->_AHOnCanDrop, pCSdest, params);
// Drop only if canDrop.
if(pCSdest->_CanDrop)
@ -2719,7 +2719,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
}
}
// call action
pIM->runActionHandler (pCSdest->_AHOnDrop, pCSdest, params);
CAHManager::getInstance()->runActionHandler (pCSdest->_AHOnDrop, pCSdest, params);
handled = true;
}
}
@ -2763,7 +2763,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
params = sTmp + "|" + params;
}
}
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnCanDrop, pList, params);
CAHManager::getInstance()->runActionHandler (pList->getCtrlSheetInfo()._AHOnCanDrop, pList, params);
// Drop only if canDrop.
if(pList->getCanDrop())
@ -2784,7 +2784,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
}
}
// call action
pIM->runActionHandler (pList->getCtrlSheetInfo()._AHOnDrop, pList, params);
CAHManager::getInstance()->runActionHandler (pList->getCtrlSheetInfo()._AHOnDrop, pList, params);
handled = true;
}
}
@ -2799,7 +2799,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
string sTmp = pTextList->getCtrlSheetInfo()._AHCanDropParams;
params = sTmp + "|" + params;
}
pIM->runActionHandler (pTextList->getCtrlSheetInfo()._AHOnCanDrop, pTextList, params);
CAHManager::getInstance()->runActionHandler (pTextList->getCtrlSheetInfo()._AHOnCanDrop, pTextList, params);
// Drop only if canDrop.
if(pTextList->getCanDrop())
@ -2812,7 +2812,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
params = sTmp + "|" + params; // must copy 'drop' params at start because it could be the name of a procedure
}
// call action
pIM->runActionHandler (pTextList->getCtrlSheetInfo()._AHOnDrop, pTextList, params);
CAHManager::getInstance()->runActionHandler (pTextList->getCtrlSheetInfo()._AHOnDrop, pTextList, params);
handled = true;
}
}
@ -2822,7 +2822,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
if (!handled && _AHOnCannotDrop != NULL )
{
pIM->runActionHandler (_AHOnCannotDrop, this, _AHCannotDropParams);
CAHManager::getInstance()->runActionHandler (_AHOnCannotDrop, this, _AHCannotDropParams);
handled = true;
}
@ -2854,7 +2854,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
// RunAction
if(_AHOnLeftClick != NULL)
pIM->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnLeftClick, this, _AHLeftClickParams);
// Run Menu (if item is not being dragged)
if (!_ListMenuLeft.empty() && _LastDraggedSheet == NULL)
{
@ -2884,7 +2884,7 @@ bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event)
if(_AHOnRightClick != NULL)
{
handled= true;
pIM->runActionHandler (_AHOnRightClick, this, _AHRightClickParams);
CAHManager::getInstance()->runActionHandler (_AHOnRightClick, this, _AHRightClickParams);
}
// Run Menu (if item is not being dragged)
if (!_ListMenuRight.empty() || !_ListMenuRightEmptySlot.empty())

@ -295,7 +295,7 @@ void CDBGroupComboBox::setSelection(sint32 val)
if (!_CallingOnChangeActionHandler)
{
_CallingOnChangeActionHandler = true;
CInterfaceManager::getInstance()->runActionHandler (_AHOnChange, this, _AHOnChangeParams);
CAHManager::getInstance()->runActionHandler (_AHOnChange, this, _AHOnChangeParams);
_CallingOnChangeActionHandler = false;
}
}
@ -578,7 +578,7 @@ public:
// After menu init, Call user activation method
if( !pCB->_AHOnSelectStart.empty() )
{
pIM->runActionHandler(pCB->_AHOnSelectStart, pCB);
CAHManager::getInstance()->runActionHandler(pCB->_AHOnSelectStart, pCB);
}
// launch the menu

@ -730,7 +730,7 @@ void CDBGroupListSheet::draw ()
string sTmp = _CtrlInfo._AHCanDropParams;
params = sTmp + "|" + params;
}
pIM->runActionHandler (_CtrlInfo._AHOnCanDrop, this, params);
CAHManager::getInstance()->runActionHandler (_CtrlInfo._AHOnCanDrop, this, params);
}
}
}

@ -640,7 +640,7 @@ void CDBGroupListSheetText::draw ()
string sTmp = _CtrlInfo._AHCanDropParams;
params = sTmp + "|" + params;
}
pIM->runActionHandler (_CtrlInfo._AHOnCanDrop, this, params);
CAHManager::getInstance()->runActionHandler (_CtrlInfo._AHOnCanDrop, this, params);
}
}
}
@ -1138,7 +1138,7 @@ class CHandlerListSheetTextSelect : public IActionHandler
CCtrlButton *ctrlButton= listSheetTrade->_SheetChildren[selected]->Button;
// run it, but take the wanted action handler
pIM->runActionHandler(
CAHManager::getInstance()->runActionHandler(
listSheetTrade->_CtrlInfo._AHOnLeftClick, ctrlSheet,
listSheetTrade->_CtrlInfo._AHLeftClickParams);
@ -1175,7 +1175,7 @@ class CHandlerListSheetTextRightClick : public IActionHandler
CDBCtrlSheet::setCurrSelSheet(ctrlSheet);
// run it, but take the wanted action handler
pIM->runActionHandler(
CAHManager::getInstance()->runActionHandler(
listSheetTrade->_CtrlInfo._AHOnRightClick, ctrlSheet,
listSheetTrade->_CtrlInfo._AHRightClickParams);

@ -330,7 +330,7 @@ bool CCtrlResizer::handleEvent (const NLGUI::CEventDescriptor &event)
if (gc && gc->getAHOnResizePtr() != NULL)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(gc->getAHOnResize(), gc, gc->getAHOnResizeParams());
CAHManager::getInstance()->runActionHandler(gc->getAHOnResize(), gc, gc->getAHOnResizeParams());
}
}
return true;
@ -716,7 +716,7 @@ bool CCtrlMover::handleEvent (const NLGUI::CEventDescriptor &event)
if (gc->getAHOnBeginMovePtr())
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(gc->getAHOnBeginMove(), gc, gc->getAHOnBeginMoveParams());
CAHManager::getInstance()->runActionHandler(gc->getAHOnBeginMove(), gc, gc->getAHOnBeginMoveParams());
}
return true;
}
@ -825,7 +825,7 @@ bool CCtrlMover::handleEvent (const NLGUI::CEventDescriptor &event)
// udpate XReal/YReal coords only of the container
gc->CInterfaceElement::updateCoords();
// execute the AH
pIM->runActionHandler(gc->getAHOnMovePtr(), this, gc->getAHOnMoveParams());
CAHManager::getInstance()->runActionHandler(gc->getAHOnMovePtr(), this, gc->getAHOnMoveParams());
}
}
else
@ -1033,13 +1033,13 @@ bool CCtrlMover::runTitleActionHandler()
CInterfaceGroup *gr = gc->isOpen() ? gc->getHeaderOpened() : gc->getHeaderClosed();
if (gr && !gr->getLeftClickHandler().empty())
{
im->runActionHandler(gr->getLeftClickHandler(), this, gr->getLeftClickHandlerParams());
CAHManager::getInstance()->runActionHandler(gr->getLeftClickHandler(), this, gr->getLeftClickHandlerParams());
return true;
}
// try with the main group
if (!gc->getLeftClickHandler().empty())
{
im->runActionHandler(gc->getLeftClickHandler(), this, gc->getLeftClickHandlerParams());
CAHManager::getInstance()->runActionHandler(gc->getLeftClickHandler(), this, gc->getLeftClickHandlerParams());
return true;
}
return false;
@ -2330,7 +2330,7 @@ void CGroupContainer::open()
if (_AHOnOpen != NULL)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(_AHOnOpen, this, _AHOnOpenParams);
CAHManager::getInstance()->runActionHandler(_AHOnOpen, this, _AHOnOpenParams);
}
}
@ -2358,7 +2358,7 @@ void CGroupContainer::close()
if (_AHOnClose != NULL)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(_AHOnClose, this, _AHOnCloseParams);
CAHManager::getInstance()->runActionHandler(_AHOnClose, this, _AHOnCloseParams);
}
}
@ -3502,7 +3502,7 @@ public:
CGroupContainer::_ValidateCanDeactivate = true;
if (!pIC->getAHOnDeactiveCheck().empty())
{
im->runActionHandler(pIC->getAHOnDeactiveCheck(), pCaller, pIC->getAHOnDeactiveCheckParams());
CAHManager::getInstance()->runActionHandler(pIC->getAHOnDeactiveCheck(), pCaller, pIC->getAHOnDeactiveCheckParams());
}
if (CGroupContainer::_ValidateCanDeactivate)
@ -3510,7 +3510,7 @@ public:
// send close button msg
if (!pIC->getAHOnCloseButton().empty())
{
im->runActionHandler(pIC->getAHOnCloseButton(), pCaller, pIC->getAHOnCloseButtonParams());
CAHManager::getInstance()->runActionHandler(pIC->getAHOnCloseButton(), pCaller, pIC->getAHOnCloseButtonParams());
}
CWidgetManager::getInstance()->setBackWindow(pIC);
pIC->setActive(false);
@ -3596,7 +3596,7 @@ class CICHelp : public IActionHandler
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
// open the web browser, and point to the page
pIM->runActionHandler("launch_help", NULL, "url=" + helpPage);
CAHManager::getInstance()->runActionHandler("launch_help", NULL, "url=" + helpPage);
}
}
};
@ -4035,7 +4035,7 @@ void CGroupContainer::triggerAlphaSettingsChangedAH()
if (_AHOnAlphaSettingsChanged != NULL)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(_AHOnAlphaSettingsChanged, this, _AHOnAlphaSettingsChangedParams);
CAHManager::getInstance()->runActionHandler(_AHOnAlphaSettingsChanged, this, _AHOnAlphaSettingsChangedParams);
}
}

@ -594,7 +594,7 @@ void CGroupEditBox::handleEventChar(const NLGUI::CEventDescriptorKey &rEDK)
// stop selection
_CurrSelection = NULL;
_CursorAtPreviousLineEnd = false;
pIM->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
}
else
{
@ -701,7 +701,7 @@ void CGroupEditBox::handleEventChar(const NLGUI::CEventDescriptorKey &rEDK)
}
if (rEDK.getChar() == KeyRETURN)
{
pIM->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
}
}
_CursorAtPreviousLineEnd = false;
@ -753,7 +753,7 @@ void CGroupEditBox::triggerOnChangeAH()
if (!_AHOnChange.empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}
@ -1291,7 +1291,7 @@ void CGroupEditBox::setCommand(const ucstring &command, bool execute)
// stop selection
_CurrSelection = NULL;
_CursorAtPreviousLineEnd = false;
CInterfaceManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
CAHManager::getInstance()->runActionHandler(_AHOnEnter, this, _AHOnEnterParams);
}
else
{
@ -1409,7 +1409,7 @@ void CGroupEditBox::onKeyboardCaptureLost()
if (!_AHOnFocusLost.empty())
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(_AHOnFocusLost, this, _AHOnFocusLostParams);
CAHManager::getInstance()->runActionHandler(_AHOnFocusLost, this, _AHOnFocusLostParams);
}
}

@ -338,7 +338,7 @@ public:
{
ghe->setW(_TargetGroup->getW());
ghe->invalidateCoords();
im->runActionHandler(ghe->getAHOnResize(), ghe, ghe->getAHOnResizeParams());
CAHManager::getInstance()->runActionHandler(ghe->getAHOnResize(), ghe, ghe->getAHOnResizeParams());
}
return true;
}

@ -55,7 +55,7 @@ void CGroupHTMLQCM::addText (const char * buf, int len)
if (sTmp.find("zzz_QUIT_RYZOM_zzz") != string::npos)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("quit_ryzom", NULL);
CAHManager::getInstance()->runActionHandler("quit_ryzom", NULL);
CInterfaceElement *pIE = CWidgetManager::getInstance()->getElementFromId("ui:interface:web_on_quit");
pIE->setActive(false);
}

@ -790,7 +790,7 @@ void CGroupInSceneBubbleManager::addContextHelpHTML (const string &url, const st
if (context)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("browse", NULL, "name="+context->Group->getId()+":header_opened:window:html|url="+url);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name="+context->Group->getId()+":header_opened:window:html|url="+url);
// Add the URL
context->Url = url;
@ -1277,7 +1277,7 @@ void CGroupInSceneBubbleManager::CDynBubble::skip()
if (nNbOptions == 1)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("dynchat_click_option", Bubble, "0");
CAHManager::getInstance()->runActionHandler("dynchat_click_option", Bubble, "0");
}
}

@ -3410,11 +3410,11 @@ class CAHWorldMapRightClick : public IActionHandler
if (!gm) return;
if (!gm->isIsland())
{
im->runActionHandler("active_menu", pCaller, "menu=ui:interface:map_menu");
CAHManager::getInstance()->runActionHandler("active_menu", pCaller, "menu=ui:interface:map_menu");
}
else
{
im->runActionHandler("active_menu", pCaller, "menu=ui:interface:map_menu_island");
CAHManager::getInstance()->runActionHandler("active_menu", pCaller, "menu=ui:interface:map_menu_island");
}
}
};

@ -983,7 +983,7 @@ bool CGroupSubMenu::handleEvent (const NLGUI::CEventDescriptor &event)
if ((_Selected != -1) && (!_Lines[i].ViewText->getGrayed()))
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler ( _Lines[_Selected].AHName,
CAHManager::getInstance()->runActionHandler ( _Lines[_Selected].AHName,
CWidgetManager::getInstance()->getCtrlLaunchingModal(),
_Lines[_Selected].AHParams );

@ -326,7 +326,7 @@ void CGroupQuickHelp::activateCurrentStep ()
// A link to follow ?
if (!step.URL.empty())
pIM->runActionHandler("browse", NULL, "url="+step.URL);
CAHManager::getInstance()->runActionHandler("browse", NULL, "url="+step.URL);
// Test a skip condition
if (!step.Condition.empty() && evalExpression (step.Condition))
@ -411,7 +411,7 @@ class CHandlerRunQuickHelp : public IActionHandler
button->setPushed(true);
// Run the left click action handler
pIM->runActionHandler(button->getActionOnLeftClick(), button, button->getParamsOnLeftClick());
CAHManager::getInstance()->runActionHandler(button->getActionOnLeftClick(), button, button->getParamsOnLeftClick());
}
}
}

@ -192,7 +192,7 @@ void CGroupSkills::CSkillsObs::update (ICDBNode *node)
uint skillId;
if (skillParent->getNodeIndex (skill, skillId))
{
pIM->runActionHandler("skill_popup", NULL, "skillId="+toString(skillId)+"|delta="+toString(leaf->getValue32()-leaf->getOldValue32()));
CAHManager::getInstance()->runActionHandler("skill_popup", NULL, "skillId="+toString(skillId)+"|delta="+toString(leaf->getValue32()-leaf->getOldValue32()));
// Context help
contextHelp ("skill");

@ -133,7 +133,7 @@ void CGroupTab::addTab(CCtrlTabButton * tabB)
if(_HideOutTabs && !_AHOnChange.empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}
@ -227,7 +227,7 @@ void CGroupTab::addTab(CCtrlTabButton * tabB, sint index)
if(_HideOutTabs && !_AHOnChange.empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}
@ -247,7 +247,7 @@ int CGroupTab::luaAddTab(CLuaState &ls)
if(_HideOutTabs && !_AHOnChange.empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}
return 0;
@ -334,7 +334,7 @@ void CGroupTab::removeTab(sint index)
if(!_AHOnChange.empty())
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}
}
@ -505,7 +505,7 @@ void CGroupTab::updateFirstTabButton()
if(!_AHOnChange.empty() && ((oldFirstTabIndex!=_FirstTabIndex) || (oldLastTabIndex!=_LastTabIndex)))
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(_AHOnChange, this, _ParamsOnChange);
CAHManager::getInstance()->runActionHandler(_AHOnChange, this, _ParamsOnChange);
}
}

@ -727,7 +727,7 @@ void CGroupTree::selectLine(uint line, bool runAH /*= true*/)
{
_CancelNextSelectLine = false;
/*
pIM->runActionHandler ( _Lines[line].Node->AHName,
CAHManager::getInstance()->runActionHandler ( _Lines[line].Node->AHName,
this,
_Lines[line].Node->AHParams );
*/
@ -736,7 +736,7 @@ void CGroupTree::selectLine(uint line, bool runAH /*= true*/)
_SelectedLine = line;
_SelectedNode = _Lines[line].Node;
}
pIM->runActionHandler ( _Lines[line].Node->AHName,
CAHManager::getInstance()->runActionHandler ( _Lines[line].Node->AHName,
this,
_Lines[line].Node->AHParams );
_CancelNextSelectLine = false;
@ -755,7 +755,7 @@ bool CGroupTree::rightButton(uint line)
if (line != (uint) _SelectedLine) selectLine(line, false);
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler ( _Lines[line].Node->AHNameRight,
CAHManager::getInstance()->runActionHandler ( _Lines[line].Node->AHNameRight,
this,
_Lines[line].Node->AHParamsRight );
return true;
@ -863,7 +863,7 @@ bool CGroupTree::handleEvent (const NLGUI::CEventDescriptor& event)
}
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler(changedNode->AHNameClose, this, changedNode->AHParamsClose);
CAHManager::getInstance()->runActionHandler(changedNode->AHNameClose, this, changedNode->AHParamsClose);
}
forceRebuild();
}
@ -1303,7 +1303,7 @@ bool CGroupTree::selectNodeById(const std::string &nodeId, bool triggerAH)
_AvoidSelectNodeByIdIR= true;
// launch the action handler
pIM->runActionHandler ( selNode->AHName,
CAHManager::getInstance()->runActionHandler ( selNode->AHName,
this,
selNode->AHParams );
}

@ -54,12 +54,12 @@ bool CInterfaceGroupWheel::handleEvent(const NLGUI::CEventDescriptor &event)
CInterfaceManager *im = CInterfaceManager::getInstance();
if (eventDesc.getWheel() > 0 && _AHWheelUp)
{
im->runActionHandler (_AHWheelUp, this, _AHWheelUpParams);
CAHManager::getInstance()->runActionHandler (_AHWheelUp, this, _AHWheelUpParams);
return true;
}
else if (_AHWheelDown)
{
im->runActionHandler (_AHWheelDown, this, _AHWheelDownParams);
CAHManager::getInstance()->runActionHandler (_AHWheelDown, this, _AHWheelDownParams);
return true;
}
}

@ -437,7 +437,7 @@ void CGuildManager::update()
}
// Rebuild interface. Rebuild members only if needed
pIM->runActionHandler("guild_sheet_open", NULL, toString("update_members=%d", (uint)_NeedUpdateMembers) );
CAHManager::getInstance()->runActionHandler("guild_sheet_open", NULL, toString("update_members=%d", (uint)_NeedUpdateMembers) );
}
}
@ -1035,7 +1035,7 @@ public:
}
NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:GUILD_LIST:SORT_ORDER")->setValue32((sint32)order);
pIM->runActionHandler("guild_sheet_open", NULL, toString("update_members=1"));
CAHManager::getInstance()->runActionHandler("guild_sheet_open", NULL, toString("update_members=1"));
}
};
REGISTER_ACTION_HANDLER(CAHGuildSheetSortGuildList, "sort_guild_list");

@ -642,7 +642,7 @@ void CInterfaceAnim::stop()
CInterfaceManager *pIM = CInterfaceManager::getInstance();
if (!_AHOnFinish.empty())
pIM->runActionHandler(_AHOnFinish, _Parent, _AHOnFinishParams);
CAHManager::getInstance()->runActionHandler(_AHOnFinish, _Parent, _AHOnFinishParams);
}
// **************************

@ -116,11 +116,11 @@ void CInterfaceGroup::setActive(bool state)
CInterfaceManager *pIM = CInterfaceManager::getInstance();
if (_AHOnActive != NULL && state)
{
pIM->runActionHandler (_AHOnActive, this, _AHOnActiveParams);
CAHManager::getInstance()->runActionHandler (_AHOnActive, this, _AHOnActiveParams);
}
if (_AHOnDeactive != NULL && !state)
{
pIM->runActionHandler (_AHOnDeactive, this, _AHOnDeactiveParams);
CAHManager::getInstance()->runActionHandler (_AHOnDeactive, this, _AHOnDeactiveParams);
}
notifyActiveCalled(NLGUI::CEventDescriptorActiveCalledOnParent(state));
@ -739,7 +739,7 @@ bool CInterfaceGroup::handleEvent (const NLGUI::CEventDescriptor &event)
{
if (_AHOnLeftClick != NULL)
{
im->runActionHandler(_AHOnLeftClick, this, _AHOnLeftClickParams);
CAHManager::getInstance()->runActionHandler(_AHOnLeftClick, this, _AHOnLeftClickParams);
return true;
}
}
@ -748,7 +748,7 @@ bool CInterfaceGroup::handleEvent (const NLGUI::CEventDescriptor &event)
{
if (_AHOnRightClick != NULL)
{
im->runActionHandler(_AHOnRightClick, this, _AHOnRightClickParams);
CAHManager::getInstance()->runActionHandler(_AHOnRightClick, this, _AHOnRightClickParams);
return true;
}
}
@ -868,7 +868,7 @@ void CInterfaceGroup::executeLuaScriptOnDraw()
if(!_LUAOnDraw.empty())
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
pIM->runActionHandler("lua", this, _LUAOnDraw);
CAHManager::getInstance()->runActionHandler("lua", this, _LUAOnDraw);
}
}

@ -365,7 +365,7 @@ void CInterfaceLink::update()
if(launch)
{
CInterfaceManager *im = CInterfaceManager::getInstance();
im->runActionHandler(_ActionHandler, _AHParent, _AHParams);
CAHManager::getInstance()->runActionHandler(_ActionHandler, _AHParent, _AHParams);
// do not add any code after this line because this can be deleted !!!!
}
}

@ -1386,79 +1386,6 @@ CInterfaceOptions *CInterfaceManager::getOptions(const string &name)
return it->second;
}
// ------------------------------------------------------------------------------------------------
void CInterfaceManager::runActionHandler (const string &ahCmdLine, CCtrlBase *pCaller, const string &ahUserParams)
{
if (ahCmdLine.empty()) return;
// Special AH form ("ah:params") ?
string::size_type i = ahCmdLine.find(':');
string ahName;
string ahParams;
if(i!=string::npos)
{
ahName= ahCmdLine.substr(0, i);
ahParams= ahCmdLine.substr(i+1);
}
else
{
ahName= ahCmdLine;
}
// Replace params if defined
if(!ahUserParams.empty())
ahParams= ahUserParams;
// Execute the action handler
CAHManager *pAHFM = CAHManager::getInstance();
map<string, IActionHandler*>::iterator it = pAHFM->FactoryMap.find (ahName);
if (it == pAHFM->FactoryMap.end())
{
nlwarning ("not found action handler : %s",ahName.c_str());
return;
}
IActionHandler *pAH = it->second;
pAH->execute (pCaller, ahParams);
// Quick Help
const string submitQuickHelp = "submit_quick_help";
it = pAHFM->FactoryMap.find(submitQuickHelp);
if(it == pAHFM->FactoryMap.end())
{
nlwarning ("not found action handler : %s", submitQuickHelp.c_str());
return;
}
pAH = it->second;
const std::string event = ahName + ":" + ahParams;
pAH->execute(NULL, event);
}
// ------------------------------------------------------------------------------------------------
void CInterfaceManager::runActionHandler (IActionHandler *pAH, CCtrlBase *pCaller, const std::string &Params)
{
if (pAH == NULL)
{
nlwarning ("no action handler");
return;
}
pAH->execute (pCaller, Params);
string AHName = CAHManager::getInstance()->getAHName(pAH);
// Quick Help
const string submitQuickHelp = "submit_quick_help";
CAHManager *pAHFM = CAHManager::getInstance();
map<string, IActionHandler*>::iterator it = pAHFM->FactoryMap.find (AHName);
it = pAHFM->FactoryMap.find(submitQuickHelp);
if(it == pAHFM->FactoryMap.end())
{
nlwarning ("not found action handler : %s", submitQuickHelp.c_str());
return;
}
pAH = it->second;
const std::string event = AHName + ":" + Params;
pAH->execute(NULL, event);
}
// ------------------------------------------------------------------------------------------------
void CInterfaceManager::setupOptions()
{
@ -2403,7 +2330,7 @@ void CInterfaceManager::drawContextHelp ()
// UserDefined context help
if( !newCtrl->getContextHelpActionHandler().empty() )
{
runActionHandler(newCtrl->getContextHelpActionHandler(), newCtrl, newCtrl->getContextHelpAHParams() );
CAHManager::getInstance()->runActionHandler(newCtrl->getContextHelpActionHandler(), newCtrl, newCtrl->getContextHelpAHParams() );
}
// If the text is finally empty (Special AH case), abort
@ -2726,7 +2653,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
if( dynamic_cast<CGroupModal*>(win) )
{
if(!win->getAHOnEscape().empty())
runActionHandler(win->getAHOnEscape(), win, win->getAHOnEscapeParams());
CAHManager::getInstance()->runActionHandler(win->getAHOnEscape(), win, win->getAHOnEscapeParams());
CWidgetManager::getInstance()->popModalWindow();
handled= true;
}
@ -2735,7 +2662,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
else if(!_CaptureKeyboard )
{
if(!win->getAHOnEscape().empty())
runActionHandler(win->getAHOnEscape(), win, win->getAHOnEscapeParams());
CAHManager::getInstance()->runActionHandler(win->getAHOnEscape(), win, win->getAHOnEscapeParams());
win->setActive(false);
handled= true;
}
@ -2760,7 +2687,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
else
{
// The window or modal control the OnEnter. Execute, and don't go to the chat.
runActionHandler(tw->getAHOnEnter(), tw, tw->getAHOnEnterParams());
CAHManager::getInstance()->runActionHandler(tw->getAHOnEnter(), tw, tw->getAHOnEnterParams());
handled= true;
}
}
@ -2880,7 +2807,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown ||
(eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown))
if (!mwi.ModalHandlerClickOut.empty())
runActionHandler(mwi.ModalHandlerClickOut,NULL,mwi.ModalClickOutParams);
CAHManager::getInstance()->runActionHandler(mwi.ModalHandlerClickOut,NULL,mwi.ModalClickOutParams);
// If the current window is not the modal and if must quit on click out
if(pNewCurrentWnd != mwi.ModalWindow && mwi.ModalExitClickOut)
@ -2945,7 +2872,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
notifyElementCaptured(_CapturePointerLeft);
if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty())
{
runActionHandler(clickedOutModalWindow->OnPostClickOut, _CapturePointerLeft, clickedOutModalWindow->OnPostClickOutParams);
CAHManager::getInstance()->runActionHandler(clickedOutModalWindow->OnPostClickOut, _CapturePointerLeft, clickedOutModalWindow->OnPostClickOutParams);
}
}
//if found
@ -2994,7 +2921,7 @@ bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event)
notifyElementCaptured(_CapturePointerRight);
if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty())
{
runActionHandler(clickedOutModalWindow->OnPostClickOut, _CapturePointerRight, clickedOutModalWindow->OnPostClickOutParams);
CAHManager::getInstance()->runActionHandler(clickedOutModalWindow->OnPostClickOut, _CapturePointerRight, clickedOutModalWindow->OnPostClickOutParams);
}
}
//if found
@ -3681,7 +3608,7 @@ void CInterfaceManager::setCaptureKeyboard(CCtrlBase *c)
if (!newEb->getAHOnFocus().empty())
{
runActionHandler(newEb->getAHOnFocus(), newEb, newEb->getAHOnFocusParams());
CAHManager::getInstance()->runActionHandler(newEb->getAHOnFocus(), newEb, newEb->getAHOnFocusParams());
}
}
@ -3739,7 +3666,7 @@ void CInterfaceManager::runProcedure (const string &procName, CCtrlBase *pCaller
action.buildParams(paramList, params);
// run
//nlwarning("step %d : %s, %s", (int) i, action.Action.c_str(), params.c_str());
runActionHandler(action.Action, pCaller, params);
CAHManager::getInstance()->runActionHandler(action.Action, pCaller, params);
}
}
}
@ -4715,7 +4642,7 @@ uint CInterfaceManager::getUserDblClickDelay()
void CInterfaceManager::submitEvent (const std::string &event)
{
// Submit the event to the quick help system
runActionHandler("submit_quick_help", NULL, event);
CAHManager::getInstance()->runActionHandler("submit_quick_help", NULL, event);
}
// ***************************************************************************
@ -4888,7 +4815,7 @@ void CInterfaceManager::displayWebWindow(const string & name, const string & url
pIG->center();
}
runActionHandler("browse", NULL, "name="+name+":content:html|url="+url);
CAHManager::getInstance()->runActionHandler("browse", NULL, "name="+name+":content:html|url="+url);
}
/*
// ***************************************************************************
@ -4897,7 +4824,7 @@ class CHandlerDispWebOnQuit : public IActionHandler
virtual void execute (CCtrlBase *pCaller, const string &Params)
{
if (ClientCfg.Local)
CInterfaceManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:quit_dialog");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:quit_dialog");
else
CInterfaceManager::getInstance()->displayWebWindow("ui:interface:web_on_quit", "http://213.208.119.190/igpoll/poll_form.php");
}
@ -4909,7 +4836,7 @@ class CHandlerExitWebOnQuit : public IActionHandler
{
virtual void execute (CCtrlBase *pCaller, const string &Params)
{
CInterfaceManager::getInstance()->runActionHandler("quit_ryzom", pCaller);
CAHManager::getInstance()->runActionHandler("quit_ryzom", pCaller);
}
};
REGISTER_ACTION_HANDLER (CHandlerExitWebOnQuit, "exit_web_on_quit");
@ -5188,7 +5115,6 @@ void CInterfaceManager::updateEmotes()
// Just call the action handler with good params
bool CInterfaceManager::CEmoteCmd::execute(const std::string &/* rawCommandString */, const vector<string> &args, CLog &/* log */, bool /* quiet */, bool /* human */)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
string customPhrase;
if( args.size() > 0 )
{
@ -5199,7 +5125,7 @@ bool CInterfaceManager::CEmoteCmd::execute(const std::string &/* rawCommandStrin
customPhrase += " ";
customPhrase += args[i];
}
pIM->runActionHandler("emote", NULL, "nb="+toString(EmoteNb)+"|behav="+toString(Behaviour)+"|custom_phrase="+customPhrase);
CAHManager::getInstance()->runActionHandler("emote", NULL, "nb="+toString(EmoteNb)+"|behav="+toString(Behaviour)+"|custom_phrase="+customPhrase);
return true;
}

@ -276,10 +276,6 @@ public:
/// Handle The Event. return true if the interfaceManager catch it and if must not send to the Game Action Manager
bool handleEvent (const NLGUI::CEventDescriptor &eventDesc);
bool handleMouseMoveEvent( const NLGUI::CEventDescriptor &eventDesc );
void runActionHandler (const std::string &AHName, CCtrlBase *pCaller,
const std::string &Params=std::string(""));
void runActionHandler (IActionHandler *ah, CCtrlBase *pCaller,
const std::string &Params=std::string(""));
// execute a procedure. give a list of parameters. NB: the first param is the name of the proc (skipped)...
void runProcedure(const std::string &procName, CCtrlBase *pCaller, const std::vector<std::string> &paramList);
// replace an action in a procedure (if possible)

@ -2313,7 +2313,7 @@ bool CInterfaceParser::initCoordsAndLuaScript()
{
// execute the script on this group
CInterfaceManager *pIM= CInterfaceManager::getInstance();
pIM->runActionHandler("lua", itLua->first, itLua->second);
CAHManager::getInstance()->runActionHandler("lua", itLua->first, itLua->second);
}

@ -1746,12 +1746,12 @@ void CTempInvManager::update()
{
// If all slots are empty, close the interface
pGC->setActive(false);
pIM->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
CAHManager::getInstance()->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
}
else
{
pGC->setActive(true);
pIM->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
CAHManager::getInstance()->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
// Something arrived, change text
switch(_Mode)
{
@ -1884,7 +1884,7 @@ void CTempInvManager::open(TEMP_INV_MODE::TInventoryMode m)
};
pGC->setActive(true);
pIM->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
CAHManager::getInstance()->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
}
}
@ -1906,7 +1906,7 @@ void CTempInvManager::close()
if (pIG != NULL)
{
pIG->setActive(false);
pIM->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
CAHManager::getInstance()->runActionHandler("phrase_update_all_memory_ctrl_regen_tick_range", NULL);
}
}
@ -2706,7 +2706,7 @@ class CHandlerInvDropTo : public IActionHandler
if (((pListDstText != NULL) && (pListDstText->getInvType() == CInventoryManager::InvBag)) ||
((pListDstIcon != NULL) && (pListDstIcon->getInvType() == CInventoryManager::InvBag)))
{
pIM->runActionHandler("proc", pCSSrc, "move_to_bag");
CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_bag");
}
else if (((pListDstText != NULL) && ((pListDstText->getInvType() == CInventoryManager::InvPA0) ||
(pListDstText->getInvType() == CInventoryManager::InvPA1) ||
@ -2722,18 +2722,18 @@ class CHandlerInvDropTo : public IActionHandler
string sTmp;
if (pListDstText != NULL) sTmp = toString("%d",pListDstText->getInvType()-CInventoryManager::InvPA0);
if (pListDstIcon != NULL) sTmp = toString("%d",pListDstIcon->getInvType()-CInventoryManager::InvPA0);
pIM->runActionHandler("proc", pCSSrc, "move_to_pa|"+sTmp);
CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_pa|"+sTmp);
}
else if (((pListDstText != NULL) && (pListDstText->getInvType() == CInventoryManager::InvGuild)) ||
((pListDstIcon != NULL) && (pListDstIcon->getInvType() == CInventoryManager::InvGuild)))
{
if (strnicmp(pCSSrc->getSheet().c_str(), "LOCAL:INVENTORY:BAG", 19) == 0)
pIM->runActionHandler("proc", pCSSrc, "move_to_guild");
CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_guild");
}
else if (((pListDstText != NULL) && (pListDstText->getInvType() == CInventoryManager::InvRoom)) ||
((pListDstIcon != NULL) && (pListDstIcon->getInvType() == CInventoryManager::InvRoom)))
{
pIM->runActionHandler("proc", pCSSrc, "move_to_room");
CAHManager::getInstance()->runActionHandler("proc", pCSSrc, "move_to_room");
}
}
}
@ -2760,7 +2760,7 @@ class CHandlerInvDropTo : public IActionHandler
if (i1 != 0) getInventory().equip(sBag + toString(i1-1), invPath2);
}
pIM->runActionHandler("inv_cannot_drop", pCSSrc);
CAHManager::getInstance()->runActionHandler("inv_cannot_drop", pCSSrc);
}
};
REGISTER_ACTION_HANDLER( CHandlerInvDropTo, "inv_drop" );

@ -1179,7 +1179,7 @@ int CLuaIHMRyzom::runAH(CLuaState &ls)
if(!ctrl)
throw ELuaIHMException("runAH(): '%s' is not a ctrl", pIE->getId().c_str());
}
pIM->runActionHandler(ah, ctrl, params);
CAHManager::getInstance()->runActionHandler(ah, ctrl, params);
return 0;
}

@ -584,13 +584,13 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std
onChangeCategory();
IngameDbMngr.flushObserverCalls();
NLGUI::CDBManager::getInstance()->flushObserverCalls();
//pIM->runActionHandler("editcmd_change_category",NULL);
//CAHManager::getInstance()->runActionHandler("editcmd_change_category",NULL);
pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId(WinName+WIN_EDITCMD_COMBO_ACTION));
pCB->setSelection(actCBIndex);
onChangeAction();
IngameDbMngr.flushObserverCalls();
NLGUI::CDBManager::getInstance()->flushObserverCalls();
//pIM->runActionHandler("editcmd_change_action",NULL);
//CAHManager::getInstance()->runActionHandler("editcmd_change_action",NULL);
// Count number of displayed param
uint nbRealParam = 0;
@ -1310,7 +1310,7 @@ public:
{
pMCM->CurrentEditMacro.addCommand(pMCM->EditCmd->CurrentEditCmdLine.ActionName.Name.c_str(),pMCM->EditCmd->CurrentEditCmdLine.ActionName.Argu.c_str());
}
pIM->runActionHandler("new_macro_open", pCaller);
CAHManager::getInstance()->runActionHandler("new_macro_open", pCaller);
pMCM->EditCmd->deactivate();
}
}

@ -485,7 +485,7 @@ void CMacroCmdManager::updateMacroExecution ()
}
// Here we have to execute the current command
pIM->runActionHandler(rC.Name, NULL, rC.Params);
CAHManager::getInstance()->runActionHandler(rC.Name, NULL, rC.Params);
// Flush interface links (else bug with Macro "Select ShortCutBar/Run Shortcut"
IngameDbMngr.flushObserverCalls();
@ -526,9 +526,9 @@ void CMacroCmdManager::refreshAllKeyDisplays()
{
CInterfaceManager *pIM= CInterfaceManager::getInstance();
// Refresh Key Window
pIM->runActionHandler("keys_open", NULL);
CAHManager::getInstance()->runActionHandler("keys_open", NULL);
// Refresh gestion_windows container
pIM->runActionHandler("gestion_windows_update_key_binding", NULL);
CAHManager::getInstance()->runActionHandler("gestion_windows_update_key_binding", NULL);
}
// ------------------------------------------------------------------------------------------------
@ -670,9 +670,9 @@ public:
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
pIM->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_BACK);
pIM->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_ICON);
pIM->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_OVER);
CAHManager::getInstance()->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_BACK);
CAHManager::getInstance()->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_ICON);
CAHManager::getInstance()->runActionHandler("reset_pushed", NULL, string("dblink=")+GROUP_MACROICONCREATION_OVER);
uint8 back = pMCM->CurrentEditMacro.BitmapBack;
if (back != 0xff)
@ -707,9 +707,9 @@ public:
pCS->setMacroText(pEB->getInputStringAsStdString());
}
pIM->runActionHandler("set_macro_back", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(back));
pIM->runActionHandler("set_macro_icon", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(icon));
pIM->runActionHandler("set_macro_over", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(over));
CAHManager::getInstance()->runActionHandler("set_macro_back", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(back));
CAHManager::getInstance()->runActionHandler("set_macro_icon", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(icon));
CAHManager::getInstance()->runActionHandler("set_macro_over", NULL, string("target=")+CTRL_MACROICONCREATION_ICON+"|value="+toString(over));
}
};
REGISTER_ACTION_HANDLER( CHandlerMacroIconCreationOpen, "macro_icon_creation_open");
@ -740,7 +740,7 @@ public:
pMCM->CurrentEditMacro.moveUpCommand(nCmdNb);
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CMacroCmdManager::getInstance()->EditCmd->deactivate();
pIM->runActionHandler("new_macro_open",NULL);
CAHManager::getInstance()->runActionHandler("new_macro_open",NULL);
}
};
REGISTER_ACTION_HANDLER( CHandlerNewMacroCmdMoveUp, "new_macro_cmd_move_up");
@ -757,7 +757,7 @@ public:
pMCM->CurrentEditMacro.moveDownCommand(nCmdNb);
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CMacroCmdManager::getInstance()->EditCmd->deactivate();
pIM->runActionHandler("new_macro_open",NULL);
CAHManager::getInstance()->runActionHandler("new_macro_open",NULL);
}
};
REGISTER_ACTION_HANDLER( CHandlerNewMacroCmdMoveDown, "new_macro_cmd_move_down");
@ -790,7 +790,7 @@ public:
pMCM->CurrentEditMacro.delCommand(nCmdNb);
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CMacroCmdManager::getInstance()->EditCmd->deactivate();
pIM->runActionHandler("new_macro_open",NULL);
CAHManager::getInstance()->runActionHandler("new_macro_open",NULL);
}
};
REGISTER_ACTION_HANDLER( CHandlerNewMacroCmdDelete, "new_macro_cmd_delete");
@ -820,7 +820,7 @@ public:
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("new_macro_enter_name",NULL);
CAHManager::getInstance()->runActionHandler("new_macro_enter_name",NULL);
CMacroCmdManager *pMCM = CMacroCmdManager::getInstance();
pMCM->EditCmd->activate();
}
@ -914,7 +914,7 @@ public:
CSPhraseManager *pPM = CSPhraseManager::getInstance();
// Validate name
pIM->runActionHandler("new_macro_enter_name",NULL);
CAHManager::getInstance()->runActionHandler("new_macro_enter_name",NULL);
// Check if macro has more than one command
if (pMCM->CurrentEditMacro.Commands.size() == 0) return;
@ -939,7 +939,7 @@ public:
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId(WIN_NEWMACRO));
if (pGC != NULL) pGC->setActive (false);
pIM->runActionHandler("macros_open",NULL);
CAHManager::getInstance()->runActionHandler("macros_open",NULL);
// Refresh key containers
pMCM->refreshAllKeyDisplays();
@ -1060,7 +1060,7 @@ public:
{
sint nMacNb = getMacroFromId(pCaller->getId());
CInterfaceManager::getInstance()->runActionHandler(AH_MACRO_EXEC,pCaller,toString(nMacNb));
CAHManager::getInstance()->runActionHandler(AH_MACRO_EXEC,pCaller,toString(nMacNb));
}
};
REGISTER_ACTION_HANDLER( CHandlerMacrosExec, "macros_exec");
@ -1124,7 +1124,7 @@ public:
pPM->deleteMacroShortcuts(pMCM->getMacros()[nMacNb].ID);
// then delete
pMCM->delMacro(nMacNb);
pIM->runActionHandler("macros_open",NULL);
CAHManager::getInstance()->runActionHandler("macros_open",NULL);
// Refresh key containers
pMCM->refreshAllKeyDisplays();

@ -2236,7 +2236,7 @@ public:
CGroupEditBox *geb = dynamic_cast<CGroupEditBox *>(gc->getGroup("add_contact_eb:eb"));
geb->setInputString(ucstring(""));
}
pIM->runActionHandler("enter_modal", pCaller, sParams);
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, sParams);
}
}
}
@ -2300,7 +2300,7 @@ public:
}
}
}
pIM->runActionHandler("leave_modal", pCaller, "");
CAHManager::getInstance()->runActionHandler("leave_modal", pCaller, "");
}
};
REGISTER_ACTION_HANDLER( CHandlerAddContact, "add_contact");
@ -2745,12 +2745,12 @@ class CHandlerChatTargetSelected : public IActionHandler
if (cw == PeopleInterraction.ChatGroup.Window)
{
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
CInterfaceManager::getInstance()->runActionHandler("chat_group_filter", NULL, "user");
CAHManager::getInstance()->runActionHandler("chat_group_filter", NULL, "user");
}
if (cw == PeopleInterraction.TheUserChat.Window)
{
PeopleInterraction.TheUserChat.Filter.setTargetGroup(cf.getTargetGroup(), cf.getTargetDynamicChannelDbIndex());
CInterfaceManager::getInstance()->runActionHandler("user_chat_active", NULL, "");
CAHManager::getInstance()->runActionHandler("user_chat_active", NULL, "");
}
// The target should be a party chat

@ -587,7 +587,7 @@ void CSkillManager::checkTitleUnblocked(CHARACTER_TITLE::ECharacterTitle i, bool
string titleStr = CHARACTER_TITLE::toString((CHARACTER_TITLE::ECharacterTitle)i);
bool womenTitle = (UserEntity && UserEntity->getGender() == GSGENDER::female);
const ucstring newtitle(CStringManagerClient::getTitleLocalizedName(titleStr, womenTitle));
pIM->runActionHandler("message_popup", NULL, "text1="+newtitle.toUtf8()+"|text0="+CI18N::get("uiNewTitleBold").toUtf8());
CAHManager::getInstance()->runActionHandler("message_popup", NULL, "text1="+newtitle.toUtf8()+"|text0="+CI18N::get("uiNewTitleBold").toUtf8());
}
else
{
@ -612,7 +612,7 @@ void CSkillManager::checkTitleUnblocked(CHARACTER_TITLE::ECharacterTitle i, bool
}
// Update title combo box
pIM->runActionHandler("title_init_combobox", NULL);
CAHManager::getInstance()->runActionHandler("title_init_combobox", NULL);
}
}
}
@ -1032,7 +1032,7 @@ void CSkillManager::blockTitleFromServer(CHARACTER_TITLE::ECharacterTitle ct)
void CSkillManager::setPlayerTitle(const std::string &name)
{
setCurrentTitle(CHARACTER_TITLE::toCharacterTitle(name));
CInterfaceManager::getInstance()->runActionHandler("title_init_combobox", NULL);
CAHManager::getInstance()->runActionHandler("title_init_combobox", NULL);
}
@ -1051,7 +1051,7 @@ public:
virtual void execute(CCtrlBase * /* pCaller */, const string &/* Params */)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("title_combobox_button", NULL);
CAHManager::getInstance()->runActionHandler("title_combobox_button", NULL);
// Setup UI:TITLE from current title
CSkillManager *pSM = CSkillManager::getInstance();

@ -255,7 +255,7 @@ void CLightCycleManager::updateState()
CInterfaceManager * pIM = CInterfaceManager::getInstance();
if( pIM )
{
pIM->runActionHandler("set",NULL,"dblink=UI:VARIABLES:NIGHT_WARNING_WANTED|value=1");
CAHManager::getInstance()->runActionHandler("set",NULL,"dblink=UI:VARIABLES:NIGHT_WARNING_WANTED|value=1");
}
}
_State = Night;

@ -221,7 +221,7 @@ void initEula()
}
else
{
pIM->runActionHandler("accept_eula", NULL);
CAHManager::getInstance()->runActionHandler("accept_eula", NULL);
}
}
@ -265,7 +265,7 @@ void initCatDisplay()
else
{
LoginSM.pushEvent(CLoginStateMachine::ev_run_patch);
// pIM->runActionHandler("login_patch", NULL);
// CAHManager::getInstance()->runActionHandler("login_patch", NULL);
}
}
@ -492,7 +492,7 @@ void loginMainLoop()
else
{
LoginSM.pushEvent(CLoginStateMachine::ev_no_patch);
// pIM->runActionHandler("login_patch", NULL);
// CAHManager::getInstance()->runActionHandler("login_patch", NULL);
}
}
else
@ -744,11 +744,11 @@ void initLoginScreen()
{
pGEB->setInputString(l);
}
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
}
else
{
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
}
@ -766,7 +766,7 @@ void initAutoLogin()
CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
pGEBLog->setInputString(LoginLogin);
pGEBPwd->setInputString(LoginPassword);
pIM->runActionHandler("on_login", NULL, "");
CAHManager::getInstance()->runActionHandler("on_login", NULL, "");
if (ClientCfg.R2Mode)
{
@ -793,7 +793,7 @@ void initAutoLogin()
else
{
LoginSM.pushEvent(CLoginStateMachine::ev_login_ok);
// pIM->runActionHandler("login_connect_2", NULL);
// CAHManager::getInstance()->runActionHandler("login_connect_2", NULL);
}
}
}
@ -869,11 +869,11 @@ bool login()
// CGroupEditBox *pGEB = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_LOGIN));
// if (pGEB != NULL)
// pGEB->setInputString(l);
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
// }
// else
// {
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// }
ShardSelected = -1;
@ -891,7 +891,7 @@ bool login()
// CGroupEditBox *pGEBPwd = dynamic_cast<CGroupEditBox*>(CWidgetManager::getInstance()->getElementFromId(CTRL_EDITBOX_PASSWORD));
// pGEBLog->setInputString(LoginLogin);
// pGEBPwd->setInputString(LoginPassword);
// pIM->runActionHandler("on_login", NULL, "");
// CAHManager::getInstance()->runActionHandler("on_login", NULL, "");
// // Select good shard
// ShardSelected = -1;
// for (uint32 i = 0; i < Shards.size(); ++i)
@ -906,7 +906,7 @@ bool login()
// if (ShardSelected == -1)
// pIM->messageBox(CI18N::get("uiErrServerLost"), "ui:login");
// else
// pIM->runActionHandler("login_connect_2", NULL);
// CAHManager::getInstance()->runActionHandler("login_connect_2", NULL);
// }
// start the login state machine
@ -1090,7 +1090,7 @@ void initShardDisplay()
CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
if (pCB != NULL)
pCB->setPushed(true);
pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
CAHManager::getInstance()->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
}
pList->invalidateCoords();
@ -1217,7 +1217,7 @@ void onlogin(bool vanishScreen = true)
// CCtrlButton *pCB = dynamic_cast<CCtrlButton*>(CWidgetManager::getInstance()->getElementFromId(GROUP_LIST_SHARD ":s0:but"));
// if (pCB != NULL)
// pCB->setPushed(true);
// pIM->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
// CAHManager::getInstance()->runActionHandler (pCB->getActionOnLeftClick(), pCB, pCB->getParamsOnLeftClick());
//
// }
// pList->invalidateCoords();
@ -1233,9 +1233,9 @@ void onlogin(bool vanishScreen = true)
// NLGUI::CDBManager::getInstance()->getDbProp("UI:VARIABLES:SCREEN")->setValue32(UI_VARIABLES_SCREEN_CHECKPASS);
//
// if (LoginLogin.empty())
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// else
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
}
}
@ -1470,7 +1470,7 @@ class CAHLoginConnect : public IActionHandler
// }
// else
// {
// pIM->runActionHandler("login_patch",NULL);
// CAHManager::getInstance()->runActionHandler("login_patch",NULL);
// }
}
};
@ -2173,9 +2173,9 @@ class CAHOnScanDataClose : public IActionHandler
// loginEB= pGEB->getInputStringAsStdString();
// // if none entered
// if (loginEB.empty())
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_LOGIN "|select_all=false");
// else
// pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
// CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_PASSWORD "|select_all=false");
}
}
};
@ -2354,7 +2354,7 @@ bool initCreateAccount()
rulesGr->setActive(false);
// must be done after hide rules
pIM->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_CREATEACCOUNT_LOGIN "|select_all=false");
CAHManager::getInstance()->runActionHandler("set_keyboard_focus", NULL, "target=" CTRL_EDITBOX_CREATEACCOUNT_LOGIN "|select_all=false");
}

@ -1665,13 +1665,13 @@ void impulseTPCommon2(NLMISC::CBitMemStream &impulse, bool hasSeason)
switch(tpContext)
{
case R2::TPContext_Mainland:
CInterfaceManager::getInstance()->runActionHandler("return_to_mainland", NULL);
CAHManager::getInstance()->runActionHandler("return_to_mainland", NULL);
break;
case R2::TPContext_Edit:
CInterfaceManager::getInstance()->runActionHandler("r2ed_stop_test", NULL);
CAHManager::getInstance()->runActionHandler("r2ed_stop_test", NULL);
break;
case R2::TPContext_IslandOwner:
CInterfaceManager::getInstance()->runActionHandler("r2_stop_live", NULL);
CAHManager::getInstance()->runActionHandler("r2_stop_live", NULL);
break;
default:
break;

@ -105,7 +105,7 @@ void COutpostManager::update()
CInterfaceManager *pIM= CInterfaceManager::getInstance();
// Force the neutral choose
pIM->runActionHandler("outpost_pvp_join", NULL, "neutral");
CAHManager::getInstance()->runActionHandler("outpost_pvp_join", NULL, "neutral");
// close the window
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:join_pvp_outpost_proposal"));

@ -5281,7 +5281,7 @@ void CEditor::onTestModeConnected()
CHECK_EDITOR
// TODO nico : change the name of the function : should rather be 'onAnimationModeConnected'
// start as a GM
getUI().runActionHandler("r2ed_anim_dm_mode", NULL, "");
CAHManager::getInstance()->runActionHandler("r2ed_anim_dm_mode", NULL, "");
_DMC->CDynamicMapClient::onTestModeConnected();
}
@ -7394,7 +7394,7 @@ class CAHInviteCharacter : public IActionHandler
CHECK_EDITOR
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("leave_modal", pCaller, "");
CAHManager::getInstance()->runActionHandler("leave_modal", pCaller, "");
if(pCaller)
{
@ -7429,11 +7429,11 @@ class CAHInviteCharacter : public IActionHandler
if (pVT != NULL)
pVT->setText(CI18N::get("uiRingWarningInviteFreeTrial"));
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_free_trial");
}
else if(sessionBrowser._LastInvokeResult == 12)
{
pIM->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_newcomer");
CAHManager::getInstance()->runActionHandler("enter_modal", pCaller, "group=ui:interface:warning_newcomer");
}
geb->setInputString(ucstring(""));

@ -141,7 +141,7 @@ void CToolCreateEntity::commit(const NLMISC::CVector &createPosition, float crea
// prevent newly created ghost to be removed twice ...
removeGhostSlot();
// re set this tool to generate a new entity look
getUI().runActionHandler("r2ed_create_entity", NULL, "PaletteId=" + _PaletteId);
CAHManager::getInstance()->runActionHandler("r2ed_create_entity", NULL, "PaletteId=" + _PaletteId);
}
}
@ -616,7 +616,7 @@ void CToolCreateEntity::updateAfterRender()
{
commitArray();
CTool::TSmartPtr hold(this);
getUI().runActionHandler("r2ed_create_entity", NULL, "PaletteId="+_PaletteId);
CAHManager::getInstance()->runActionHandler("r2ed_create_entity", NULL, "PaletteId="+_PaletteId);
return;
}
break;
@ -825,7 +825,7 @@ class CAHR2EDToggleDrawArray : public IActionHandler
CToolCreateEntity *tce = dynamic_cast<CToolCreateEntity *>(getEditor().getCurrentTool());
if (tce)
{
im->runActionHandler("r2ed_create_entity", NULL, "PaletteId=" + tce->getPaletteId());
CAHManager::getInstance()->runActionHandler("r2ed_create_entity", NULL, "PaletteId=" + tce->getPaletteId());
}
}
}

@ -222,7 +222,7 @@ int CSessionBrowserImpl::luaJoinRingSession(CLuaState &ls)
CViewText* pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:warning_free_trial:text"));
if (pVT != NULL)
pVT->setText(CI18N::get("uiRingWarningFreeTrial"));
pIM->runActionHandler("enter_modal", NULL, "group=ui:interface:warning_free_trial");
CAHManager::getInstance()->runActionHandler("enter_modal", NULL, "group=ui:interface:warning_free_trial");
}
return 0;
@ -326,7 +326,7 @@ void CSessionBrowserImpl::on_joinSessionResult(NLNET::TSockId /* from */, uint32
if (result == 0)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->runActionHandler("on_connect_to_shard", NULL, string("cookie=")+NetMngr.getLoginCookie().toString()+"|fsAddr="+shardAddr);
CAHManager::getInstance()->runActionHandler("on_connect_to_shard", NULL, string("cookie=")+NetMngr.getLoginCookie().toString()+"|fsAddr="+shardAddr);
}
}

@ -1571,12 +1571,12 @@ void CUserEntity::moveToAction(CEntityCL *ent)
// Quartering
case CUserEntity::Quarter:
if((ent->properties()).harvestable())
IM->runActionHandler("context_quartering", 0);
CAHManager::getInstance()->runActionHandler("context_quartering", 0);
break;
// Loot
case CUserEntity::Loot:
if((ent->properties()).lootable())
IM->runActionHandler("context_loot", 0);
CAHManager::getInstance()->runActionHandler("context_loot", 0);
break;
// Pick Up
case CUserEntity::PickUp:
@ -1587,57 +1587,57 @@ void CUserEntity::moveToAction(CEntityCL *ent)
break;
// Trade Item
case CUserEntity::TradeItem:
IM->runActionHandler("context_trade_item", 0);
CAHManager::getInstance()->runActionHandler("context_trade_item", 0);
break;
// Trade Phrase
case CUserEntity::TradePhrase:
IM->runActionHandler("context_trade_phrase", 0);
CAHManager::getInstance()->runActionHandler("context_trade_phrase", 0);
break;
// Trade Pact
case CUserEntity::TradePact:
IM->runActionHandler("context_trade_pact", 0);
CAHManager::getInstance()->runActionHandler("context_trade_pact", 0);
break;
// Mission
case CUserEntity::Mission:
{
string param = toString("id=%d", _MoveToMissionId);
IM->runActionHandler("mission_option", 0, param);
CAHManager::getInstance()->runActionHandler("mission_option", 0, param);
}
break;
// Dynamic Mission
case CUserEntity::DynamicMission:
IM->runActionHandler("context_dynamic_mission", 0);
CAHManager::getInstance()->runActionHandler("context_dynamic_mission", 0);
break;
// Static Mission
case CUserEntity::StaticMission:
IM->runActionHandler("context_choose_mission", 0);
CAHManager::getInstance()->runActionHandler("context_choose_mission", 0);
break;
// Mission
case CUserEntity::MissionRing:
{
string param = toString("id=%d", _MoveToMissionId);
IM->runActionHandler("mission_ring", 0, param);
CAHManager::getInstance()->runActionHandler("mission_ring", 0, param);
}
break;
// Create Guild
case CUserEntity::CreateGuild:
IM->runActionHandler("context_create_guild", 0);
CAHManager::getInstance()->runActionHandler("context_create_guild", 0);
break;
// News
case CUserEntity::News:
IM->runActionHandler("context_talk", 0);
CAHManager::getInstance()->runActionHandler("context_talk", 0);
break;
// Trade Teleport
case CUserEntity::TradeTeleport:
IM->runActionHandler("context_trade_teleport", 0);
CAHManager::getInstance()->runActionHandler("context_trade_teleport", 0);
break;
// Trade Faction items
case CUserEntity::TradeFaction:
IM->runActionHandler("context_trade_faction", 0);
CAHManager::getInstance()->runActionHandler("context_trade_faction", 0);
break;
// Trade Cosmetic
case CUserEntity::TradeCosmetic:
IM->runActionHandler("context_trade_cosmetic", 0);
CAHManager::getInstance()->runActionHandler("context_trade_cosmetic", 0);
break;
// Talk
case CUserEntity::Talk:
@ -1658,7 +1658,7 @@ void CUserEntity::moveToAction(CEntityCL *ent)
}
// WebPage
case CUserEntity::WebPage:
IM->runActionHandler("context_web_page", 0);
CAHManager::getInstance()->runActionHandler("context_web_page", 0);
break;
// Outpost
case CUserEntity::Outpost:
@ -2248,7 +2248,7 @@ void CUserEntity::setDead() // virtual
//CInterfaceManager * pIM = CInterfaceManager::getInstance();
if( pIM )
{
pIM->runActionHandler("set",NULL,"dblink=UI:VARIABLES:DEATH_WARNING_WANTED|value=1");
CAHManager::getInstance()->runActionHandler("set",NULL,"dblink=UI:VARIABLES:DEATH_WARNING_WANTED|value=1");
}
}// setDead //
@ -3746,7 +3746,7 @@ void CUserEntity::CSkillPointsObserver::update(ICDBNode* node )
spTitle= CI18N::get(toString("uiSkillPointsBold%d",SpType));
// run the popup
pIM->runActionHandler("message_popup", NULL, "text1="+deltaStr+"|text0="+spTitle.toUtf8());
CAHManager::getInstance()->runActionHandler("message_popup", NULL, "text1="+deltaStr+"|text0="+spTitle.toUtf8());
// Context help
contextHelp ("skill_point");

Loading…
Cancel
Save