develop
kaetemi 4 years ago
parent ecabc00ec5
commit 2d9f10bee3

@ -883,6 +883,7 @@ namespace NLGUI
driver->setCursorScale( CViewRenderer::hwCursorScale );
char bufTmp[256], tgaName[256];
tgaName[0] = 0;
string sTGAname;
float uvMinU, uvMinV, uvMaxU, uvMaxV;
while (!iFile.eof())

@ -2295,7 +2295,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
womanTitle = ( c->getGender() == GSGENDER::female );
}
string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(), womanTitle);
string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle);
// Sometimes translation contains another title
{
@ -2305,11 +2305,11 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
_EntityName = _EntityName = STRING_MANAGER::CStringManagerClient::getLocalizedName(sn.substr(0, pos));
string::size_type pos2 = replacement.find('$', pos + 1);
_TitleRaw = replacement.substr(pos+1, pos2 - pos - 1);
replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(), womanTitle);
replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, womanTitle);
}
}
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw.toUtf8(), womanTitle);
_Tags = STRING_MANAGER::CStringManagerClient::getTitleInfos(_TitleRaw, womanTitle);
if (!replacement.empty() || !ClientCfg.DebugStringManager)
{
@ -2320,7 +2320,7 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
_NameEx = replacement;
newtitle = _NameEx.toUtf8();
}
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw.toUtf8() );
CHARACTER_TITLE::ECharacterTitle titleEnum = CHARACTER_TITLE::toCharacterTitle( _TitleRaw );
if ( titleEnum >= CHARACTER_TITLE::BeginGmTitle && titleEnum <= CHARACTER_TITLE::EndGmTitle )
{
_GMTitle = titleEnum - CHARACTER_TITLE::BeginGmTitle;
@ -2352,13 +2352,13 @@ void CEntityCL::onStringAvailable(uint /* stringId */, const std::string &value)
{
CInterfaceManager *pIM = CInterfaceManager::getInstance();
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
if (pVT != NULL) pVT->setText(_Title.toUtf8());
if (pVT != NULL) pVT->setText(_Title);
CGroupContainer *pGC = dynamic_cast<CGroupContainer*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player"));
if (pGC != NULL) pGC->setUCTitle(_EntityName);
CSkillManager *pSM = CSkillManager::getInstance();
pSM->setPlayerTitle(_TitleRaw.toUtf8());
pSM->setPlayerTitle(_TitleRaw);
}
// Must rebuild the in scene interface 'cause name has changed

@ -769,25 +769,25 @@ public:
bool isAnOutpostAlly() const;
/// Return the entity title
const ucstring &getTitle() const
const std::string &getTitle() const
{
return _Title;
}
/// Return the entity tags
const ucstring &getTag(uint8 id) const
const std::string &getTag(uint8 id) const
{
if (_Tags.size() > id) {
return _Tags[id];
}
static ucstring empty;
static const std::string empty;
return empty;
}
/// Return the raw unparsed entity title
const ucstring getTitleRaw() const
const std::string &getTitleRaw() const
{
return ucstring(_TitleRaw);
return _TitleRaw;
}
/// Return true if this entity has a reserved title
@ -933,11 +933,11 @@ protected:
// Current Name for the entity
std::string _EntityName;
// Current entity title
ucstring _Title;
std::string _Title;
// Current entity tags
std::vector<std::string> _Tags;
// Current entity title string id
ucstring _TitleRaw;
std::string _TitleRaw;
// Current permanent content symbol for the entity
std::string _PermanentStatutIcon;
// Has reserved title?

@ -202,7 +202,7 @@ CGroupInSceneUserInfo *CGroupInSceneUserInfo::build (CEntityCL *entity)
const char *templateName;
const char *theTribeName = "";
std::string entityName = entity->getDisplayName();
std::string entityTitle = entity->getTitle().toUtf8();
std::string entityTitle = entity->getTitle();
// For some NPC's the name is empty and only a title is given,
// in that case, treat the title as the name.

@ -4218,13 +4218,13 @@ bool CInterfaceManager::parseTokens(string& ucstr)
// special case where there is only a title, very rare case for some NPC
if (name.empty())
{
name = pTokenSubjectEntity->getTitle().toUtf8();
name = pTokenSubjectEntity->getTitle();
}
token_replacement = name.empty() ? token_replacement : name;
}
else if (token_param == "title")
{
string title = pTokenSubjectEntity->getTitle().toUtf8();
string title = pTokenSubjectEntity->getTitle();
token_replacement = title.empty() ? token_replacement : title;
}
else if (token_param == "race")

@ -1371,7 +1371,7 @@ int CLuaIHMRyzom::getPlayerName(CLuaState &ls)
int CLuaIHMRyzom::getPlayerTitleRaw(CLuaState &ls)
{
CLuaIHM::checkArgCount(ls, "getPlayerTitleRaw", 0);
ls.push(UserEntity->getTitleRaw().toUtf8());
ls.push(UserEntity->getTitleRaw());
return 1;
}
@ -1379,7 +1379,7 @@ int CLuaIHMRyzom::getPlayerTitleRaw(CLuaState &ls)
int CLuaIHMRyzom::getPlayerTitle(CLuaState &ls)
{
CLuaIHM::checkArgCount(ls, "getPlayerTitle", 0);
ls.push(UserEntity->getTitle().toUtf8());
ls.push(UserEntity->getTitle());
return 1;
}
@ -1453,7 +1453,7 @@ int CLuaIHMRyzom::getTargetTitleRaw(CLuaState &ls)
if (!target) return 0;
ls.push(target->getTitleRaw().toUtf8());
ls.push(target->getTitleRaw());
return 1;
}
@ -1465,7 +1465,7 @@ int CLuaIHMRyzom::getTargetTitle(CLuaState &ls)
if (!target) return 0;
ls.push(target->getTitle().toUtf8());
ls.push(target->getTitle());
return 1;
}

@ -743,7 +743,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle *
}
// update title when gender changed
const string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(), _Gender == GSGENDER::female);
const string replacement = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw, _Gender == GSGENDER::female);
if (!replacement.empty() || !ClientCfg.DebugStringManager)
{
// Get extended name
@ -754,7 +754,7 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle *
if (_Slot == 0)
{
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:interface:player:header_opened:player_title"));
if (pVT != NULL) pVT->setText(_Title.toUtf8());
if (pVT != NULL) pVT->setText(_Title);
}
// rebuild in scene interface

@ -446,7 +446,7 @@ void CPlayerR2CL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle
}
// update title when gender changed
const string replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw.toUtf8(),_Gender == GSGENDER::female));
const string replacement(STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(_TitleRaw,_Gender == GSGENDER::female));
if (!replacement.empty())
{
// Get extended name

Loading…
Cancel
Save