|
|
@ -4609,38 +4609,30 @@ public:
|
|
|
|
};
|
|
|
|
};
|
|
|
|
REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame");
|
|
|
|
REGISTER_ACTION_HANDLER( CHandlerSortTribeFame, "sort_tribefame");
|
|
|
|
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
|
|
|
// navigate_charsel
|
|
|
|
|
|
|
|
// Arg : current slot selected
|
|
|
|
|
|
|
|
// ***************************************************************************
|
|
|
|
// ***************************************************************************
|
|
|
|
class CHandlerCharselNaviGetKeys : public IActionHandler
|
|
|
|
class CHandlerCharselNaviGetKeys : public IActionHandler
|
|
|
|
{
|
|
|
|
{
|
|
|
|
virtual void execute (CCtrlBase * /* pCaller */, const string &Params)
|
|
|
|
virtual void execute (CCtrlBase *pCaller, const string &Params)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sint32 slot = 0;
|
|
|
|
const std::string ui = pCaller->getParent()->getId();
|
|
|
|
if (!getParam(Params, "cs").empty())
|
|
|
|
if (ui != "ui:outgame")
|
|
|
|
fromString(getParam(Params, "cs"), slot);
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyESCAPE))
|
|
|
|
if (Params.empty())
|
|
|
|
CAHManager::getInstance()->runActionHandler("proc", NULL, "proc_quit");
|
|
|
|
{
|
|
|
|
|
|
|
|
sint32 event = -1;
|
|
|
|
|
|
|
|
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyRETURN))
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyESCAPE)) event = 0;
|
|
|
|
CAHManager::getInstance()->runActionHandler("proc", NULL, "proc_charsel_enterkeyslot");
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyDELETE)) event = 1;
|
|
|
|
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyRETURN)) event = 2;
|
|
|
|
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyDOWN)) event = 3;
|
|
|
|
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyUP)) event = 4;
|
|
|
|
|
|
|
|
|
|
|
|
const sint32 index = slot;
|
|
|
|
if (event != -1)
|
|
|
|
if (Driver->AsyncListener.isKeyPushed(KeyUP))
|
|
|
|
CLuaManager::getInstance().executeLuaScript(toString("outgame:eventCharselKeyGet(%i)", event));
|
|
|
|
{
|
|
|
|
|
|
|
|
slot--;
|
|
|
|
|
|
|
|
if (slot < 0) slot = 4;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (Driver->AsyncListener.isKeyPushed(KeyDOWN))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
slot++;
|
|
|
|
|
|
|
|
if (slot > 4) slot = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// now select
|
|
|
|
// reset previous input
|
|
|
|
if (index != slot)
|
|
|
|
Driver->AsyncListener.reset();
|
|
|
|
CAHManager::getInstance()->runActionHandler("proc", NULL, toString("proc_charsel_clickslot|%i", slot));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" );
|
|
|
|
REGISTER_ACTION_HANDLER( CHandlerCharselNaviGetKeys, "navigate_charsel" );
|
|
|
|