CHANGED: #1471 CViewTextIDFormated no longer depends on Ryzom game related code.
--HG-- branch : gui-refactoring
This commit is contained in:
parent
a1b52bd8a5
commit
ec5214ecdb
2 changed files with 9 additions and 17 deletions
|
@ -144,6 +144,8 @@ namespace NLGUI
|
||||||
std::string _DBPath;
|
std::string _DBPath;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static IViewTextProvider* getTextProvider(){ return textProvider; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static IViewTextProvider *textProvider;
|
static IViewTextProvider *textProvider;
|
||||||
|
|
||||||
|
|
|
@ -16,20 +16,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "stdpch.h"
|
|
||||||
#include "view_text_id_formated.h"
|
#include "view_text_id_formated.h"
|
||||||
#include "nel/gui/view_text_formated.h"
|
#include "nel/gui/view_text_formated.h"
|
||||||
#include "../string_manager_client.h"
|
|
||||||
#include "../user_entity.h"
|
|
||||||
#include "../entities.h"
|
|
||||||
#include "nel/misc/xml_auto_ptr.h"
|
#include "nel/misc/xml_auto_ptr.h"
|
||||||
|
|
||||||
using namespace STRING_MANAGER;
|
|
||||||
|
|
||||||
////////////
|
|
||||||
// EXTERN //
|
|
||||||
////////////
|
|
||||||
|
|
||||||
NLMISC_REGISTER_OBJECT(CViewBase, CViewTextIDFormated, std::string, "text_id_formated");
|
NLMISC_REGISTER_OBJECT(CViewBase, CViewTextIDFormated, std::string, "text_id_formated");
|
||||||
|
|
||||||
// *********************************************************************************
|
// *********************************************************************************
|
||||||
|
@ -57,18 +47,18 @@ void CViewTextIDFormated::checkCoords()
|
||||||
{
|
{
|
||||||
ucstring result, formatedResult;
|
ucstring result, formatedResult;
|
||||||
bool bValid;
|
bool bValid;
|
||||||
#if defined(NL_DEBUG)
|
|
||||||
if (ClientCfg.Local)
|
if( CViewTextID::getTextProvider() == NULL )
|
||||||
{
|
{
|
||||||
if (!_DBPath.empty()) result = ucstring(_DBPath);
|
if(!_DBPath.empty())
|
||||||
else result = ucstring("Text ID = " + NLMISC::toString(_TextId));
|
result = ucstring(_DBPath);
|
||||||
|
else
|
||||||
|
result = ucstring("Text ID = " + NLMISC::toString(_TextId));
|
||||||
bValid = true;
|
bValid = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
CStringManagerClient *pSMC = CStringManagerClient::instance();
|
bValid = CViewTextID::getTextProvider()->getDynString (_TextId, result);
|
||||||
bValid = pSMC->getDynString (_TextId, result);
|
|
||||||
}
|
}
|
||||||
formatedResult = CViewTextFormated::formatString(_FormatString, result);
|
formatedResult = CViewTextFormated::formatString(_FormatString, result);
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue