Merged in nimetu/ryzomcore/misc-patches (pull request #44)
misc patches - cherry pick whats useful
This commit is contained in:
commit
8f5495ec88
12 changed files with 62 additions and 66 deletions
|
@ -74,14 +74,14 @@ namespace NLGUI
|
||||||
REFLECT_SINT32("rollover_container_alpha", getRolloverAlphaContainerAsSInt32, setRolloverAlphaContainer);
|
REFLECT_SINT32("rollover_container_alpha", getRolloverAlphaContainerAsSInt32, setRolloverAlphaContainer);
|
||||||
REFLECT_BOOL("use_global_alpha_settings", isUsingGlobalAlpha, setUseGlobalAlpha);
|
REFLECT_BOOL("use_global_alpha_settings", isUsingGlobalAlpha, setUseGlobalAlpha);
|
||||||
REFLECT_STRING("on_alpha_settings_changed", getAHOnAlphaSettingsChanged, setAHOnAlphaSettingsChanged);
|
REFLECT_STRING("on_alpha_settings_changed", getAHOnAlphaSettingsChanged, setAHOnAlphaSettingsChanged);
|
||||||
REFLECT_STRING("on_alpha_settings_changed_aparams", getAHOnAlphaSettingsChangedParams, setAHOnAlphaSettingsChangedParams);
|
REFLECT_STRING("on_alpha_settings_changed_params", getAHOnAlphaSettingsChangedParams, setAHOnAlphaSettingsChangedParams);
|
||||||
REFLECT_EXPORT_END
|
REFLECT_EXPORT_END
|
||||||
|
|
||||||
virtual bool isMoving() const{ return false; }
|
virtual bool isMoving() const{ return false; }
|
||||||
|
|
||||||
// Get the header color draw. NB: depends if grayed, and if active.
|
// Get the header color draw. NB: depends if grayed, and if active.
|
||||||
virtual NLMISC::CRGBA getDrawnHeaderColor () const{ return NLMISC::CRGBA(); };
|
virtual NLMISC::CRGBA getDrawnHeaderColor () const{ return NLMISC::CRGBA(); };
|
||||||
|
|
||||||
uint8 getCurrentContainerAlpha() const{ return _CurrentContainerAlpha; }
|
uint8 getCurrentContainerAlpha() const{ return _CurrentContainerAlpha; }
|
||||||
uint8 getCurrentContentAlpha() const{ return _CurrentContentAlpha; }
|
uint8 getCurrentContentAlpha() const{ return _CurrentContentAlpha; }
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ namespace NLGUI
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void triggerAlphaSettingsChangedAH();
|
void triggerAlphaSettingsChangedAH();
|
||||||
|
|
||||||
uint8 _CurrentContainerAlpha;
|
uint8 _CurrentContainerAlpha;
|
||||||
uint8 _CurrentContentAlpha;
|
uint8 _CurrentContentAlpha;
|
||||||
uint8 _ContainerAlpha;
|
uint8 _ContainerAlpha;
|
||||||
|
|
|
@ -408,7 +408,6 @@ namespace NLGUI
|
||||||
splitString(tooltipInfos, "@", tooltipInfosList);
|
splitString(tooltipInfos, "@", tooltipInfosList);
|
||||||
texName = tooltipInfosList[0];
|
texName = tooltipInfosList[0];
|
||||||
tooltip = tooltipInfosList[1];
|
tooltip = tooltipInfosList[1];
|
||||||
nlinfo(tooltip.c_str());
|
|
||||||
setString(ucstring(tooltip));
|
setString(ucstring(tooltip));
|
||||||
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
CViewRenderer &rVR = *CViewRenderer::getInstance();
|
||||||
sint32 texId = rVR.getTextureIdFromName (texName);
|
sint32 texId = rVR.getTextureIdFromName (texName);
|
||||||
|
|
|
@ -1094,7 +1094,10 @@ namespace NLGUI
|
||||||
bool updateCoordCalled= false;
|
bool updateCoordCalled= false;
|
||||||
// updateCoords the window only if the master group is his parent and if need it
|
// updateCoords the window only if the master group is his parent and if need it
|
||||||
// do it until updateCoords() no more invalidate coordinates!!
|
// do it until updateCoords() no more invalidate coordinates!!
|
||||||
while (pIG->getParent()==rMG.Group && (pIG->getInvalidCoords()>0))
|
|
||||||
|
// add deadlock counter to prevent endless loop (Issue #73: web browser long scroll lockup)
|
||||||
|
int deadlock = 10;
|
||||||
|
while (--deadlock > 0 && pIG->getParent()==rMG.Group && (pIG->getInvalidCoords()>0))
|
||||||
{
|
{
|
||||||
bRecomputeCtrlUnderPtr = true;
|
bRecomputeCtrlUnderPtr = true;
|
||||||
// Update as many pass wanted (3 time for complex resizing, 1 for scroll for example)
|
// Update as many pass wanted (3 time for complex resizing, 1 for scroll for example)
|
||||||
|
|
|
@ -529,36 +529,18 @@ void CContinentManager::serialUserLandMarks(NLMISC::IStream &f)
|
||||||
f.serialCont(dummy);
|
f.serialCont(dummy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The number of stored landmarks is not checked at this time, but if we receive a
|
|
||||||
// lower value in the server database, we will cut down using checkNumberOfUserLandmarks()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// checkNumberOfLandmarks
|
// updateUserLandMarks
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
void CContinentManager::checkNumberOfUserLandmarks( uint maxNumber )
|
void CContinentManager::updateUserLandMarks()
|
||||||
{
|
{
|
||||||
for ( TContinents::iterator it=_Continents.begin(); it!=_Continents.end(); ++it )
|
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
||||||
{
|
if ( pMap )
|
||||||
CContinent *cont = (*it).second;
|
pMap->updateUserLandMarks();
|
||||||
if ( cont->UserLandMarks.size() > maxNumber )
|
|
||||||
{
|
|
||||||
// Just cut down the last landmarks (in case of hacked file)
|
|
||||||
if ( cont == _Current )
|
|
||||||
{
|
|
||||||
CGroupMap *pMap = dynamic_cast<CGroupMap*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:map:content:map_content:actual_map"));
|
|
||||||
if ( pMap )
|
|
||||||
pMap->removeExceedingUserLandMarks( maxNumber );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
cont->UserLandMarks.resize( maxNumber );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -112,8 +112,8 @@ public:
|
||||||
// load / saves all user landMarks
|
// load / saves all user landMarks
|
||||||
void serialUserLandMarks(NLMISC::IStream &f);
|
void serialUserLandMarks(NLMISC::IStream &f);
|
||||||
|
|
||||||
// ensure the number of landmarks per continent does not exceed maxNumber
|
// rebuild visible landmarks on current map
|
||||||
void checkNumberOfUserLandmarks( uint maxNumber );
|
void updateUserLandMarks();
|
||||||
|
|
||||||
// load / saves all fow maps
|
// load / saves all fow maps
|
||||||
void serialFOWMaps();
|
void serialFOWMaps();
|
||||||
|
|
|
@ -84,6 +84,8 @@ CDBGroupListSheet::CDBGroupListSheet(const TCtorParam ¶m)
|
||||||
_CacheAnimalStatus= -1;
|
_CacheAnimalStatus= -1;
|
||||||
|
|
||||||
_ListLeaveSpace= false;
|
_ListLeaveSpace= false;
|
||||||
|
|
||||||
|
_Draggable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
@ -227,6 +229,10 @@ bool CDBGroupListSheet::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// issue #78: dragable is not parsed by _CtrlInfo, need to do it here.
|
||||||
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||||
|
if (prop) _Draggable = convertBool(prop);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -864,6 +870,7 @@ void CDBGroupListSheet::setup()
|
||||||
ctrl->setToolTipParent(getToolTipParent());
|
ctrl->setToolTipParent(getToolTipParent());
|
||||||
ctrl->setToolTipParentPosRef(getToolTipParentPosRef());
|
ctrl->setToolTipParentPosRef(getToolTipParentPosRef());
|
||||||
ctrl->setToolTipPosRef(getToolTipPosRef());
|
ctrl->setToolTipPosRef(getToolTipPosRef());
|
||||||
|
ctrl->setDraggable(_Draggable);
|
||||||
// link on the element i+_StartDbIdx
|
// link on the element i+_StartDbIdx
|
||||||
if (_DisplayEmptySlot)
|
if (_DisplayEmptySlot)
|
||||||
{
|
{
|
||||||
|
|
|
@ -171,6 +171,7 @@ protected:
|
||||||
bool _Squarify : 1;
|
bool _Squarify : 1;
|
||||||
|
|
||||||
bool _CanDrop : 1;
|
bool _CanDrop : 1;
|
||||||
|
bool _Draggable : 1;
|
||||||
|
|
||||||
// Children
|
// Children
|
||||||
bool _Setuped;
|
bool _Setuped;
|
||||||
|
|
|
@ -69,6 +69,7 @@ CDBGroupListSheetText::CDBGroupListSheetText(const TCtorParam ¶m)
|
||||||
_AnimalStatus= NULL;
|
_AnimalStatus= NULL;
|
||||||
_CacheAnimalStatus= -1;
|
_CacheAnimalStatus= -1;
|
||||||
_CanDrop= false;
|
_CanDrop= false;
|
||||||
|
_Draggable= false;
|
||||||
|
|
||||||
for(uint i=0;i<CHARACTERISTICS::NUM_CHARACTERISTICS;i++)
|
for(uint i=0;i<CHARACTERISTICS::NUM_CHARACTERISTICS;i++)
|
||||||
_LastPlayerCharac[i]= 0;
|
_LastPlayerCharac[i]= 0;
|
||||||
|
@ -214,6 +215,10 @@ bool CDBGroupListSheetText::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup)
|
||||||
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
_AnimalStatus= NLGUI::CDBManager::getInstance()->getDbProp((const char*)prop, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// issue #78: dragable is not parsed by _CtrlInfo, need to do it here.
|
||||||
|
prop = (char*) xmlGetProp( cur, (xmlChar*)"dragable" );
|
||||||
|
if (prop) _Draggable = convertBool(prop);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -855,6 +860,7 @@ void CDBGroupListSheetText::setup()
|
||||||
ctrl->setParamsOnLeftClick(toString(i));
|
ctrl->setParamsOnLeftClick(toString(i));
|
||||||
ctrl->setActionOnRightClick("lst_rclick");
|
ctrl->setActionOnRightClick("lst_rclick");
|
||||||
ctrl->setParamsOnRightClick(toString(i));
|
ctrl->setParamsOnRightClick(toString(i));
|
||||||
|
ctrl->setDraggable(_Draggable);
|
||||||
|
|
||||||
// Add it to the list.
|
// Add it to the list.
|
||||||
_List->addCtrl(ctrl);
|
_List->addCtrl(ctrl);
|
||||||
|
|
|
@ -224,6 +224,7 @@ protected:
|
||||||
bool _GrayTextWithCtrlState;
|
bool _GrayTextWithCtrlState;
|
||||||
|
|
||||||
bool _CanDrop;
|
bool _CanDrop;
|
||||||
|
bool _Draggable;
|
||||||
|
|
||||||
// Common Info for ctrl and group
|
// Common Info for ctrl and group
|
||||||
CCtrlSheetInfo _CtrlInfo;
|
CCtrlSheetInfo _CtrlInfo;
|
||||||
|
|
|
@ -2390,8 +2390,9 @@ void CGroupMap::createContinentLandMarks()
|
||||||
|
|
||||||
// Continent Landmarks
|
// Continent Landmarks
|
||||||
createLMWidgets(_CurContinent->ContLandMarks);
|
createLMWidgets(_CurContinent->ContLandMarks);
|
||||||
|
uint nbUserLandMarks = std::min( uint(_CurContinent->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks());
|
||||||
// User Landmarks
|
// User Landmarks
|
||||||
for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k)
|
for(k = 0; k < nbUserLandMarks; ++k)
|
||||||
{
|
{
|
||||||
NLMISC::CVector2f mapPos;
|
NLMISC::CVector2f mapPos;
|
||||||
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
||||||
|
@ -2429,7 +2430,8 @@ void CGroupMap::updateUserLandMarks()
|
||||||
removeLandMarks(_UserLM);
|
removeLandMarks(_UserLM);
|
||||||
|
|
||||||
// Re create User Landmarks
|
// Re create User Landmarks
|
||||||
for(k = 0; k < _CurContinent->UserLandMarks.size(); ++k)
|
uint nbUserLandMarks = std::min( uint(_CurContinent->UserLandMarks.size()), CContinent::getMaxNbUserLandMarks());
|
||||||
|
for(k = 0; k < nbUserLandMarks; ++k)
|
||||||
{
|
{
|
||||||
NLMISC::CVector2f mapPos;
|
NLMISC::CVector2f mapPos;
|
||||||
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
worldToMap(mapPos, _CurContinent->UserLandMarks[k].Pos);
|
||||||
|
@ -2520,7 +2522,7 @@ CCtrlButton *CGroupMap::addUserLandMark(const NLMISC::CVector2f &pos, const ucst
|
||||||
void CGroupMap::removeUserLandMark(CCtrlButton *button)
|
void CGroupMap::removeUserLandMark(CCtrlButton *button)
|
||||||
{
|
{
|
||||||
if (_CurContinent == NULL) return;
|
if (_CurContinent == NULL) return;
|
||||||
nlassert(_CurContinent->UserLandMarks.size() == _UserLM.size());
|
nlassert(_CurContinent->UserLandMarks.size() >= _UserLM.size());
|
||||||
for(uint k = 0; k < _UserLM.size(); ++k)
|
for(uint k = 0; k < _UserLM.size(); ++k)
|
||||||
{
|
{
|
||||||
if (_UserLM[k] == button)
|
if (_UserLM[k] == button)
|
||||||
|
@ -2528,6 +2530,13 @@ void CGroupMap::removeUserLandMark(CCtrlButton *button)
|
||||||
delCtrl(_UserLM[k]);
|
delCtrl(_UserLM[k]);
|
||||||
_UserLM.erase(_UserLM.begin() + k);
|
_UserLM.erase(_UserLM.begin() + k);
|
||||||
_CurContinent->UserLandMarks.erase(_CurContinent->UserLandMarks.begin() + k);
|
_CurContinent->UserLandMarks.erase(_CurContinent->UserLandMarks.begin() + k);
|
||||||
|
|
||||||
|
if (_CurContinent->UserLandMarks.size() > _UserLM.size())
|
||||||
|
{
|
||||||
|
// if user has over the limit landmarks, then rebuild visible markers
|
||||||
|
updateUserLandMarks();
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2537,7 +2546,7 @@ void CGroupMap::removeUserLandMark(CCtrlButton *button)
|
||||||
void CGroupMap::updateUserLandMark(CCtrlButton *button, const ucstring &newTitle, const CUserLandMark::EUserLandMarkType lmType)
|
void CGroupMap::updateUserLandMark(CCtrlButton *button, const ucstring &newTitle, const CUserLandMark::EUserLandMarkType lmType)
|
||||||
{
|
{
|
||||||
if (_CurContinent == NULL) return;
|
if (_CurContinent == NULL) return;
|
||||||
nlassert(_CurContinent->UserLandMarks.size() == _UserLM.size());
|
nlassert(_CurContinent->UserLandMarks.size() >= _UserLM.size());
|
||||||
for(uint k = 0; k < _UserLM.size(); ++k)
|
for(uint k = 0; k < _UserLM.size(); ++k)
|
||||||
{
|
{
|
||||||
if (_UserLM[k] == button)
|
if (_UserLM[k] == button)
|
||||||
|
@ -2557,7 +2566,7 @@ CUserLandMark CGroupMap::getUserLandMark(CCtrlButton *button) const
|
||||||
{
|
{
|
||||||
CUserLandMark ulm;
|
CUserLandMark ulm;
|
||||||
if (_CurContinent == NULL) return ulm;
|
if (_CurContinent == NULL) return ulm;
|
||||||
nlassert(_CurContinent->UserLandMarks.size() == _UserLM.size());
|
nlassert(_CurContinent->UserLandMarks.size() >= _UserLM.size());
|
||||||
for(uint k = 0; k < _UserLM.size(); ++k)
|
for(uint k = 0; k < _UserLM.size(); ++k)
|
||||||
{
|
{
|
||||||
if (_UserLM[k] == button)
|
if (_UserLM[k] == button)
|
||||||
|
@ -2569,15 +2578,6 @@ CUserLandMark CGroupMap::getUserLandMark(CCtrlButton *button) const
|
||||||
|
|
||||||
return ulm;
|
return ulm;
|
||||||
}
|
}
|
||||||
//============================================================================================================
|
|
||||||
void CGroupMap::removeExceedingUserLandMarks(uint maxNumber)
|
|
||||||
{
|
|
||||||
while (_UserLM.size() > maxNumber)
|
|
||||||
{
|
|
||||||
removeUserLandMark(_UserLM.back());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//============================================================================================================
|
//============================================================================================================
|
||||||
uint CGroupMap::getNumUserLandMarks() const
|
uint CGroupMap::getNumUserLandMarks() const
|
||||||
|
|
|
@ -171,8 +171,6 @@ public:
|
||||||
void targetLandmark(CCtrlButton *lm);
|
void targetLandmark(CCtrlButton *lm);
|
||||||
// get the world position of a landmark or return vector Null if not found
|
// get the world position of a landmark or return vector Null if not found
|
||||||
void getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos);
|
void getLandmarkPosition(const CCtrlButton *lm, NLMISC::CVector2f &worldPos);
|
||||||
// remove some landmarks if there are too many
|
|
||||||
void removeExceedingUserLandMarks(uint maxNumber);
|
|
||||||
|
|
||||||
//Remove and re-create UserLandMarks
|
//Remove and re-create UserLandMarks
|
||||||
void updateUserLandMarks();
|
void updateUserLandMarks();
|
||||||
|
|
|
@ -355,7 +355,7 @@ public:
|
||||||
case 't': // add text ID
|
case 't': // add text ID
|
||||||
formatedResult += paramString;
|
formatedResult += paramString;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
case 'p': // add player name
|
case 'p': // add player name
|
||||||
if (ClientCfg.Local)
|
if (ClientCfg.Local)
|
||||||
|
@ -578,7 +578,7 @@ CInterfaceManager::~CInterfaceManager()
|
||||||
|
|
||||||
// release the database observers
|
// release the database observers
|
||||||
releaseServerToLocalAutoCopyObservers();
|
releaseServerToLocalAutoCopyObservers();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
removeFlushObserver( interfaceLinkUpdater );
|
removeFlushObserver( interfaceLinkUpdater );
|
||||||
delete interfaceLinkUpdater;
|
delete interfaceLinkUpdater;
|
||||||
|
@ -601,7 +601,7 @@ void CInterfaceManager::reset()
|
||||||
_NeutralColor = NULL;
|
_NeutralColor = NULL;
|
||||||
_WarningColor = NULL;
|
_WarningColor = NULL;
|
||||||
_ErrorColor = NULL;
|
_ErrorColor = NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
@ -744,7 +744,7 @@ void CInterfaceManager::initOutGame()
|
||||||
// Init LUA Scripting
|
// Init LUA Scripting
|
||||||
initLUA();
|
initLUA();
|
||||||
|
|
||||||
if (ClientCfg.SelectCharacter != -1)
|
if (ClientCfg.SelectCharacter != -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -836,7 +836,7 @@ void CInterfaceManager::uninitOutGame()
|
||||||
|
|
||||||
initStart = ryzomGetLocalTime ();
|
initStart = ryzomGetLocalTime ();
|
||||||
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", false);
|
CWidgetManager::getInstance()->activateMasterGroup ("ui:outgame", false);
|
||||||
|
|
||||||
CInterfaceParser *parser = dynamic_cast< CInterfaceParser* >( CWidgetManager::getInstance()->getParser() );
|
CInterfaceParser *parser = dynamic_cast< CInterfaceParser* >( CWidgetManager::getInstance()->getParser() );
|
||||||
//nlinfo ("%d seconds for activateMasterGroup", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
//nlinfo ("%d seconds for activateMasterGroup", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
|
||||||
initStart = ryzomGetLocalTime ();
|
initStart = ryzomGetLocalTime ();
|
||||||
|
@ -1575,10 +1575,10 @@ void CInterfaceManager::setupOptions()
|
||||||
{
|
{
|
||||||
CWidgetManager *wm = CWidgetManager::getInstance();
|
CWidgetManager *wm = CWidgetManager::getInstance();
|
||||||
wm->setupOptions();
|
wm->setupOptions();
|
||||||
|
|
||||||
// Try to change font if any
|
// Try to change font if any
|
||||||
string sFont = wm->getSystemOption( CWidgetManager::OptionFont ).getValStr();
|
string sFont = wm->getSystemOption( CWidgetManager::OptionFont ).getValStr();
|
||||||
|
|
||||||
if ((!sFont.empty()) && (Driver != NULL))
|
if ((!sFont.empty()) && (Driver != NULL))
|
||||||
resetTextContext(sFont.c_str(), true);
|
resetTextContext(sFont.c_str(), true);
|
||||||
// Continue to parse the rest of the interface
|
// Continue to parse the rest of the interface
|
||||||
|
@ -1810,8 +1810,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
void CInterfaceManager::CDBLandmarkObs::update(ICDBNode *node)
|
void CInterfaceManager::CDBLandmarkObs::update(ICDBNode *node)
|
||||||
{
|
{
|
||||||
uint nbBonusLandmarks = ((CCDBNodeLeaf*)node)->getValue32();
|
ContinentMngr.updateUserLandMarks();
|
||||||
ContinentMngr.checkNumberOfUserLandmarks( STANDARD_NUM_USER_LANDMARKS + nbBonusLandmarks );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2326,7 +2325,7 @@ void CInterfaceManager::displaySystemInfo(const ucstring &str, const string &cat
|
||||||
// If over popup a string at the bottom of the screen
|
// If over popup a string at the bottom of the screen
|
||||||
if ((mode == CClientConfig::SSysInfoParam::Over) || (mode == CClientConfig::SSysInfoParam::OverOnly))
|
if ((mode == CClientConfig::SSysInfoParam::Over) || (mode == CClientConfig::SSysInfoParam::OverOnly))
|
||||||
InSceneBubbleManager.addMessagePopup(str, color);
|
InSceneBubbleManager.addMessagePopup(str, color);
|
||||||
else if ( (mode == CClientConfig::SSysInfoParam::Around || mode == CClientConfig::SSysInfoParam::CenterAround)
|
else if ( (mode == CClientConfig::SSysInfoParam::Around || mode == CClientConfig::SSysInfoParam::CenterAround)
|
||||||
&& PeopleInterraction.AroundMe.Window)
|
&& PeopleInterraction.AroundMe.Window)
|
||||||
PeopleInterraction.ChatInput.AroundMe.displayMessage(str, color, 2);
|
PeopleInterraction.ChatInput.AroundMe.displayMessage(str, color, 2);
|
||||||
}
|
}
|
||||||
|
@ -3560,7 +3559,7 @@ void CInterfaceManager::CServerToLocalAutoCopy::init(const std::string &dbPath)
|
||||||
if(_ServerCounter)
|
if(_ServerCounter)
|
||||||
{
|
{
|
||||||
ICDBNode::CTextId textId;
|
ICDBNode::CTextId textId;
|
||||||
|
|
||||||
// **** Add Observers on all nodes
|
// **** Add Observers on all nodes
|
||||||
// add the observers when server node change
|
// add the observers when server node change
|
||||||
textId = ICDBNode::CTextId( string("SERVER:") + dbPath );
|
textId = ICDBNode::CTextId( string("SERVER:") + dbPath );
|
||||||
|
@ -3737,23 +3736,23 @@ char* CInterfaceManager::getTimestampHuman(const char* format /* "[%H:%M:%S] " *
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse tokens in a chatmessage or emote
|
* Parse tokens in a chatmessage or emote
|
||||||
*
|
*
|
||||||
* Valid subjects:
|
* Valid subjects:
|
||||||
* $me$
|
* $me$
|
||||||
* $t$
|
* $t$
|
||||||
* $tt$
|
* $tt$
|
||||||
* $tm1$..$tm8$
|
* $tm1$..$tm8$
|
||||||
*
|
*
|
||||||
* Valid parameters:
|
* Valid parameters:
|
||||||
* $<subject>.name$
|
* $<subject>.name$
|
||||||
* $<subject>.title$
|
* $<subject>.title$
|
||||||
* $<subject>.race$
|
* $<subject>.race$
|
||||||
* $<subject>.guild$
|
* $<subject>.guild$
|
||||||
* $<subject>.gs(m/f/n)$
|
* $<subject>.gs(m/f/n)$
|
||||||
*
|
*
|
||||||
* Default parameter if parameter result is empty:
|
* Default parameter if parameter result is empty:
|
||||||
* $<subject>.<parameter>/<default>$
|
* $<subject>.<parameter>/<default>$
|
||||||
*
|
*
|
||||||
* All \d's in default parameter remove a following character.
|
* All \d's in default parameter remove a following character.
|
||||||
*/
|
*/
|
||||||
bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
||||||
|
@ -3771,14 +3770,14 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
||||||
endless_loop_protector++;
|
endless_loop_protector++;
|
||||||
if (endless_loop_protector > 100)
|
if (endless_loop_protector > 100)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the whole token substring first
|
// Get the whole token substring first
|
||||||
end_pos = str.find(end_token, start_pos + 1);
|
end_pos = str.find(end_token, start_pos + 1);
|
||||||
|
|
||||||
if ((start_pos == ucstring::npos) ||
|
if ((start_pos == ucstring::npos) ||
|
||||||
(end_pos == ucstring::npos) ||
|
(end_pos == ucstring::npos) ||
|
||||||
(end_pos <= start_pos + 1))
|
(end_pos <= start_pos + 1))
|
||||||
{
|
{
|
||||||
// Wrong formatting; give up on this one.
|
// Wrong formatting; give up on this one.
|
||||||
|
@ -3894,7 +3893,7 @@ bool CInterfaceManager::parseTokens(ucstring& ucstr)
|
||||||
// Index is the database index (serverIndex() not used for team list)
|
// Index is the database index (serverIndex() not used for team list)
|
||||||
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString(TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false);
|
CCDBNodeLeaf *pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString(TEAM_DB_PATH ":%hu:NAME", indexInTeam ), false);
|
||||||
if (pNL && pNL->getValueBool() )
|
if (pNL && pNL->getValueBool() )
|
||||||
{
|
{
|
||||||
// There is a character corresponding to this index
|
// There is a character corresponding to this index
|
||||||
pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
pNL = NLGUI::CDBManager::getInstance()->getDbProp( NLMISC::toString( TEAM_DB_PATH ":%hu:UID", indexInTeam ), false );
|
||||||
if (pNL)
|
if (pNL)
|
||||||
|
|
Loading…
Reference in a new issue