|
|
|
@ -459,7 +459,7 @@ void CInterfaceManager::initLogin()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nldebug("Textures Login Interface");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (vector<string>::iterator it = ClientCfg.TexturesLoginInterface.begin(), end = ClientCfg.TexturesLoginInterface.end(); it != end; ++it)
|
|
|
|
|
{
|
|
|
|
|
nldebug("Textures Login Interface: %s", (*it).c_str());
|
|
|
|
@ -549,13 +549,13 @@ void CInterfaceManager::initOutGame()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nldebug("Textures OutGame Interface");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (vector<string>::iterator it = ClientCfg.TexturesOutGameInterface.begin(), end = ClientCfg.TexturesOutGameInterface.end(); it != end; ++it)
|
|
|
|
|
{
|
|
|
|
|
nldebug("Textures OutGame Interface: %s", (*it).c_str());
|
|
|
|
|
loadTextures(*it + ".tga", *it + ".txt", false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (vector<string>::iterator it = ClientCfg.TexturesOutGameInterfaceDXTC.begin(), end = ClientCfg.TexturesOutGameInterfaceDXTC.end(); it != end; ++it)
|
|
|
|
|
{
|
|
|
|
|
nldebug("Textures OutGame Interface DXTC: %s", (*it).c_str());
|
|
|
|
@ -1667,7 +1667,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|
|
|
|
|
|
|
|
|
// *** Apply the NPC icon display mode
|
|
|
|
|
CNPCIconCache::getInstance().init(!ClientCfg.R2EDEnabled && getDbProp("UI:SAVE:INSCENE:FRIEND:MISSION_ICON")->getValueBool());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2189,7 +2189,7 @@ CInterfaceGroup *CInterfaceManager::getWindowForActiveMasterGroup(const std::str
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
void CInterfaceManager::updateTooltipCoords()
|
|
|
|
|
{
|
|
|
|
|
updateTooltipCoords(_CurCtrlContextHelp);
|
|
|
|
|
updateTooltipCoords(_CurCtrlContextHelp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
@ -2239,7 +2239,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|
|
|
|
yParent = newCtrl->getYReal();
|
|
|
|
|
wParent = newCtrl->getWReal();
|
|
|
|
|
hParent = newCtrl->getHReal();
|
|
|
|
|
// Additionaly, must clip this ctrl with its parent
|
|
|
|
|
// Additionaly, must clip this ctrl with its parent
|
|
|
|
|
// (else animals are buggy for instance)
|
|
|
|
|
CInterfaceGroup *parent= newCtrl->getParent();
|
|
|
|
|
if(parent)
|
|
|
|
@ -2258,7 +2258,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// **** resolve auto posref
|
|
|
|
|
// **** resolve auto posref
|
|
|
|
|
uint clampCount = adjustTooltipPosition(newCtrl, win, newCtrl->getToolTipParentPosRef(), newCtrl->getToolTipPosRef(), xParent, yParent, wParent, hParent);
|
|
|
|
|
if (clampCount != 0)
|
|
|
|
|
{
|
|
|
|
@ -2270,7 +2270,7 @@ void CInterfaceManager::updateTooltipCoords(CCtrlBase *newCtrl)
|
|
|
|
|
adjustTooltipPosition(newCtrl, win, newCtrl->getToolTipParentPosRef(), newCtrl->getToolTipPosRef(), xParent, yParent, wParent, hParent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2364,7 +2364,7 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
{
|
|
|
|
|
// enable
|
|
|
|
|
_CurCtrlContextHelp = newCtrl->getId();
|
|
|
|
|
newCtrl->invalidateCoords();
|
|
|
|
|
newCtrl->invalidateCoords();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2376,7 +2376,7 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
// **** display
|
|
|
|
|
// ***************
|
|
|
|
|
if(_CurCtrlContextHelp)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
CInterfaceGroup *groupContextHelp = getWindowForActiveMasterGroup(_CurCtrlContextHelp->getContextHelpWindowName());
|
|
|
|
|
if(groupContextHelp)
|
|
|
|
|
{
|
|
|
|
@ -2384,12 +2384,12 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
* If this is the case, we just disable it, unless the tooltip was generated by the current modal window
|
|
|
|
|
*/
|
|
|
|
|
if (!_ModalStack.empty())
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
CInterfaceGroup *mw = _ModalStack.back().ModalWindow;
|
|
|
|
|
if (mw && mw->isIn(*groupContextHelp))
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if (_CurCtrlContextHelp->isSonOf(mw))
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
@ -2397,7 +2397,7 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
@ -2405,7 +2405,7 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
groupContextHelp->executeLuaScriptOnDraw();
|
|
|
|
|
groupContextHelp->draw ();
|
|
|
|
|
// flush layers
|
|
|
|
@ -2420,11 +2420,11 @@ void CInterfaceManager::drawContextHelp ()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CInterfaceManager::setContextHelpActive(bool active)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
|
if (!active)
|
|
|
|
|
{
|
|
|
|
|
disableContextHelp();
|
|
|
|
|
}
|
|
|
|
|
disableContextHelp();
|
|
|
|
|
}
|
|
|
|
|
_ContextHelpActive = active;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2675,7 +2675,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event)
|
|
|
|
|
CInterfaceGroup *tw= getTopWindow();
|
|
|
|
|
if(tw && !tw->getAHOnEnter().empty())
|
|
|
|
|
{
|
|
|
|
|
// if the captured keypborad is in this Modal window, then must handle him in priority
|
|
|
|
|
// if the captured keyboard is in this Modal window, then must handle him in priority
|
|
|
|
|
if(_CaptureKeyboard && _CaptureKeyboard->getRootWindow()==tw)
|
|
|
|
|
{
|
|
|
|
|
bool result = _CaptureKeyboard->handleEvent(event);
|
|
|
|
@ -5494,8 +5494,6 @@ class CHandlerEmote : public IActionHandler
|
|
|
|
|
public:
|
|
|
|
|
void execute (CCtrlBase * /* pCaller */, const std::string &sParams)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// An emote is 2 things : a phrase and an animation
|
|
|
|
|
// Phrase is the phrase that server returns in chat system
|
|
|
|
|
// Behav is the animation played
|
|
|
|
@ -5524,7 +5522,7 @@ public:
|
|
|
|
|
behavToSend = MBEHAV::IDLE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Emotes forbidden when dead, emotes with behav forbidden when
|
|
|
|
|
/* Emotes forbidden when dead, emotes with behav forbidden when
|
|
|
|
|
* stunned or swimming */
|
|
|
|
|
if ( ( behavToSend != MBEHAV::IDLE && (isSwimming() || isStunned() || isDead() ) ) )
|
|
|
|
|
{
|
|
|
|
|