Change CDBGroupComboBox to UTF-8, ryzom/ryzomcore#335

develop
kaetemi 4 years ago
parent 506f9f26bd
commit e1195fe34e

@ -60,13 +60,15 @@ namespace NLGUI
// Combo Texts // Combo Texts
void resetTexts(); void resetTexts();
void addText(const ucstring &text); void addText(const std::string &text);
void setText(uint i, const ucstring &text); void setText(uint i, const std::string &text);
void insertText(uint i, const ucstring &text); void insertText(uint i, const std::string &text);
const ucstring &getText(uint i) const; const std::string &getText(uint i) const;
ucstring getTextAsUtf16(uint i) const;
uint getTextId(uint i) const; uint getTextId(uint i) const;
uint getTextPos(uint nId) const; uint getTextPos(uint nId) const;
const ucstring &getTexture(uint i) const; const std::string &getTexture(uint i) const;
ucstring getTextureAsUtf16(uint i) const;
void setGrayed(uint i, bool g); void setGrayed(uint i, bool g);
bool getGrayed(uint i) const; bool getGrayed(uint i) const;
void removeText(uint nPos); void removeText(uint nPos);
@ -87,11 +89,13 @@ namespace NLGUI
std::string getSelectionText() const; std::string getSelectionText() const;
// view text // view text
void setViewText(const ucstring & text); void setViewText(const std::string & text);
ucstring getViewText() const; std::string getViewText() const;
void setViewTextAsUtf16(const ucstring &text) { setViewText(text.toUtf8()); }
ucstring getViewTextAsUtf16() const;
CViewText *getViewText(); CViewText *getViewText();
void setTexture(uint i, const ucstring &texture); void setTexture(uint i, const std::string &texture);
sint32 evalContentWidth() const; sint32 evalContentWidth() const;
@ -122,7 +126,7 @@ namespace NLGUI
REFLECT_LUA_METHOD("resetTexts", luaResetTexts) REFLECT_LUA_METHOD("resetTexts", luaResetTexts)
REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb) REFLECT_SINT32 ("selectionNb", getSelectionNb, setSelectionNb)
REFLECT_STRING ("selection_text", getSelectionText, setSelectionText) REFLECT_STRING ("selection_text", getSelectionText, setSelectionText)
REFLECT_UCSTRING ("view_text", getViewText, setViewText) REFLECT_UCSTRING ("view_text", getViewTextAsUtf16, setViewTextAsUtf16) // FIXME: Better to have UTF-8
REFLECT_EXPORT_END REFLECT_EXPORT_END
@ -137,8 +141,8 @@ namespace NLGUI
// sint32 // sint32
CInterfaceProperty _Selection; CInterfaceProperty _Selection;
sint32 _NotLinkedToDBSelection; sint32 _NotLinkedToDBSelection;
std::vector<std::pair<uint, ucstring> > _Texts; std::vector<std::pair<uint, std::string> > _Texts;
std::vector<ucstring> _Textures; std::vector<std::string> _Textures;
std::vector<bool> _Grayed; std::vector<bool> _Grayed;
// Action Handler called on combo click // Action Handler called on combo click
@ -155,7 +159,7 @@ namespace NLGUI
CCtrlBaseButton *_SelectButton; CCtrlBaseButton *_SelectButton;
bool _IsExternViewText; bool _IsExternViewText;
ucstring _ExternViewText; std::string _ExternViewText;
private: private:

@ -43,9 +43,9 @@ namespace NLGUI
void force_link_dbgroup_combo_box_cpp() { } void force_link_dbgroup_combo_box_cpp() { }
// Compare strings // Compare strings
static inline bool lt_text(const std::pair<int,ucstring> &s1, const std::pair<int,ucstring> &s2) static inline bool lt_text(const std::pair<int,std::string> &s1, const std::pair<int,std::string> &s2)
{ {
return toLower(s1.second) < toLower(s2.second); return toLowerAsUtf8(s1.second) < toLowerAsUtf8(s2.second);
} }
std::string CDBGroupComboBox::measureMenu; std::string CDBGroupComboBox::measureMenu;
@ -183,10 +183,10 @@ namespace NLGUI
if (name) if (name)
{ {
const char *propPtr = name; const char *propPtr = name;
ucstring Text = ucstring::makeFromUtf8(propPtr); if (NLMISC::startsWith(propPtr, "ui"))
if ((strlen(propPtr)>2) && (propPtr[0] == 'u') && (propPtr[1] == 'i')) addText(CI18N::get(propPtr).toUtf8());
Text = CI18N::get (propPtr); else
addText(Text); addText(propPtr);
} }
} }
child = child->next; child = child->next;
@ -240,11 +240,11 @@ namespace NLGUI
} }
else if(_IsExternViewText) else if(_IsExternViewText)
{ {
_ViewText->setText(_ExternViewText.toUtf8()); _ViewText->setText(_ExternViewText);
} }
else else
{ {
_ViewText->setText(_Texts[_CacheSelection].second.toUtf8()); _ViewText->setText(_Texts[_CacheSelection].second);
} }
} }
} }
@ -274,7 +274,7 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CDBGroupComboBox::addText(const ucstring &text) void CDBGroupComboBox::addText(const std::string &text)
{ {
dirt(); dirt();
_Texts.push_back(make_pair((uint)_Texts.size(), text)); _Texts.push_back(make_pair((uint)_Texts.size(), text));
@ -283,7 +283,7 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CDBGroupComboBox::setText(uint i, const ucstring &text) void CDBGroupComboBox::setText(uint i, const std::string &text)
{ {
dirt(); dirt();
if(i<_Texts.size()) if(i<_Texts.size())
@ -291,7 +291,7 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CDBGroupComboBox::insertText(uint i, const ucstring &text) void CDBGroupComboBox::insertText(uint i, const std::string &text)
{ {
dirt(); dirt();
if(i<_Texts.size()) if(i<_Texts.size())
@ -313,7 +313,7 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CDBGroupComboBox::setTexture(uint i, const ucstring &texture) void CDBGroupComboBox::setTexture(uint i, const std::string &texture)
{ {
dirt(); dirt();
if(i<_Textures.size()) if(i<_Textures.size())
@ -351,13 +351,19 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
const ucstring &CDBGroupComboBox::getText(uint i) const const std::string &CDBGroupComboBox::getText(uint i) const
{ {
static ucstring null; static const std::string empty;
if(i<_Texts.size()) if (i < _Texts.size())
return _Texts[i].second; return _Texts[i].second;
else else
return null; return empty;
}
// ***************************************************************************
ucstring CDBGroupComboBox::getTextAsUtf16(uint i) const
{
return ucstring::makeFromUtf8(getText(i));
} }
// *************************************************************************** // ***************************************************************************
@ -385,15 +391,21 @@ namespace NLGUI
{ {
sort(_Texts.begin(), _Texts.end(), lt_text); sort(_Texts.begin(), _Texts.end(), lt_text);
} }
// *************************************************************************** // ***************************************************************************
const ucstring &CDBGroupComboBox::getTexture(uint i) const const std::string &CDBGroupComboBox::getTexture(uint i) const
{ {
static ucstring null; static const std::string empty;
if(i<_Textures.size()) if (i < _Textures.size())
return _Textures[i]; return _Textures[i];
else else
return null; return empty;
}
// ***************************************************************************
ucstring CDBGroupComboBox::getTextureAsUtf16(uint i) const
{
return ucstring::makeFromUtf8(getTexture(i));
} }
// *************************************************************************** // ***************************************************************************
@ -452,8 +464,7 @@ namespace NLGUI
sint32 value; sint32 value;
for(uint i=0; i<getNumTexts(); i++) for(uint i=0; i<getNumTexts(); i++)
{ {
std::string sText; std::string sText = getText(i);
getText(i).toString(sText);
if(sText == val) if(sText == val)
{ {
value = i; value = i;
@ -464,15 +475,21 @@ namespace NLGUI
} }
// *************************************************************************** // ***************************************************************************
void CDBGroupComboBox::setViewText(const ucstring & text) void CDBGroupComboBox::setViewText(const std::string &text)
{ {
_IsExternViewText = true; _IsExternViewText = true;
_ExternViewText = text; _ExternViewText = text;
_ViewText->setText(_ExternViewText.toUtf8()); _ViewText->setText(_ExternViewText);
} }
// *************************************************************************** // ***************************************************************************
ucstring CDBGroupComboBox::getViewText() const std::string CDBGroupComboBox::getViewText() const
{
return _ViewText->getText();
}
// ***************************************************************************
ucstring CDBGroupComboBox::getViewTextAsUtf16() const
{ {
return CUtfStringView(_ViewText->getText()).toUtf16(); return CUtfStringView(_ViewText->getText()).toUtf16();
} }
@ -486,18 +503,14 @@ namespace NLGUI
// *************************************************************************** // ***************************************************************************
std::string CDBGroupComboBox::getSelectionText() const std::string CDBGroupComboBox::getSelectionText() const
{ {
ucstring text;
if (_LinkedToDB) if (_LinkedToDB)
{ {
text = getText(_Selection.getSInt32()); return getText(_Selection.getSInt32());
} }
else else
{ {
text = getText(_NotLinkedToDBSelection); return getText(_NotLinkedToDBSelection);
} }
std::string texteS;
text.toString(texteS);
return texteS;
} }
// *************************************************************************** // ***************************************************************************
@ -538,8 +551,7 @@ namespace NLGUI
sint32 value; sint32 value;
for(uint i=0; i<getNumTexts(); i++) for(uint i=0; i<getNumTexts(); i++)
{ {
std::string sText; std::string sText = getText(i);
getText(i).toString(sText);
if(sText == text) if(sText == text)
{ {
value = i; value = i;
@ -566,7 +578,7 @@ namespace NLGUI
CLuaIHM::checkArgTypeUCString(ls, funcName, 1); CLuaIHM::checkArgTypeUCString(ls, funcName, 1);
ucstring text; ucstring text;
nlverify(CLuaIHM::pop(ls, text)); nlverify(CLuaIHM::pop(ls, text));
addText(text); addText(text.toUtf8()); // FIXME: Lua should just do UTF-8!
return 0; return 0;
} }
@ -579,7 +591,7 @@ namespace NLGUI
CLuaIHM::checkArgTypeUCString(ls, funcName, 2); CLuaIHM::checkArgTypeUCString(ls, funcName, 2);
ucstring text; ucstring text;
nlverify(CLuaIHM::pop(ls, text)); nlverify(CLuaIHM::pop(ls, text));
setText((uint) ls.toInteger(1), text); setText((uint) ls.toInteger(1), text.toUtf8()); // FIXME: Lua should just do UTF-8!
return 0; return 0;
} }
@ -592,7 +604,7 @@ namespace NLGUI
CLuaIHM::checkArgTypeUCString(ls, funcName, 2); CLuaIHM::checkArgTypeUCString(ls, funcName, 2);
ucstring text; ucstring text;
nlverify(CLuaIHM::pop(ls, text)); nlverify(CLuaIHM::pop(ls, text));
insertText((uint) ls.toInteger(1), text); insertText((uint) ls.toInteger(1), text.toUtf8()); // FIXME: Lua should just do UTF-8!
return 0; return 0;
} }
@ -605,7 +617,7 @@ namespace NLGUI
CLuaIHM::checkArgTypeUCString(ls, funcName, 2); CLuaIHM::checkArgTypeUCString(ls, funcName, 2);
ucstring texture; ucstring texture;
nlverify(CLuaIHM::pop(ls, texture)); nlverify(CLuaIHM::pop(ls, texture));
setTexture((uint) ls.toInteger(1), texture); setTexture((uint) ls.toInteger(1), texture.toUtf8()); // FIXME: Lua should just do UTF-8!
return 0; return 0;
} }
@ -625,7 +637,7 @@ namespace NLGUI
const char *funcName = "removeText"; const char *funcName = "removeText";
CLuaIHM::checkArgCount(ls, funcName, 1); CLuaIHM::checkArgCount(ls, funcName, 1);
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER); CLuaIHM::checkArgType(ls, funcName, 1, LUA_TNUMBER);
removeText((uint) ls.toInteger(1)); removeText((uint)ls.toInteger(1));
return 0; return 0;
} }
@ -652,12 +664,12 @@ namespace NLGUI
{ {
// set the id as the parameter // set the id as the parameter
bool checkable = false; bool checkable = false;
if(getTexture(i).toString() != std::string()) if (getTexture(i) != std::string())
{ {
checkable = true; checkable = true;
} }
groupMenu->addLine(getText(i), "combo_box_select_end", toString(i), groupMenu->addLine(ucstring::makeFromUtf8(getText(i)), "combo_box_select_end", toString(i),
"", std::string(), getTexture(i).toString(), checkable); "", std::string(), getTexture(i), checkable);
groupMenu->setGrayedLine(i, getGrayed(i)); groupMenu->setGrayedLine(i, getGrayed(i));
} }

@ -6437,7 +6437,7 @@ namespace NLGUI
if (cb) if (cb)
{ {
uint lineIndex = cb->getNumTexts(); uint lineIndex = cb->getNumTexts();
cb->addText(_SelectOptionStr); cb->addText(_SelectOptionStr.toUtf8());
if (_Forms.back().Entries.back().sbOptionDisabled == lineIndex) if (_Forms.back().Entries.back().sbOptionDisabled == lineIndex)
{ {
cb->setGrayed(lineIndex, true); cb->setGrayed(lineIndex, true);

@ -3013,7 +3013,7 @@ void updateVRDevicesComboUI(bool enable)
{ {
std::stringstream displayname; std::stringstream displayname;
displayname << std::string("[") << VRDeviceCache[i].first << "] [" << VRDeviceCache[i].second << "]"; displayname << std::string("[") << VRDeviceCache[i].first << "] [" << VRDeviceCache[i].second << "]";
pCB->addText(ucstring(displayname.str())); pCB->addText(displayname.str());
if (ClientCfg.VRDisplayDevice == VRDeviceCache[i].first) if (ClientCfg.VRDisplayDevice == VRDeviceCache[i].first)
{ {
if (selectedDevice == -1 || ClientCfg.VRDisplayDeviceId == VRDeviceCache[i].second) if (selectedDevice == -1 || ClientCfg.VRDisplayDeviceId == VRDeviceCache[i].second)
@ -3027,7 +3027,7 @@ void updateVRDevicesComboUI(bool enable)
// configured device not found, add a dummy // configured device not found, add a dummy
std::stringstream displayname; std::stringstream displayname;
displayname << std::string("[") << ClientCfg.VRDisplayDevice << "] [" << ClientCfg.VRDisplayDeviceId<< "] [DEVICE NOT FOUND]"; displayname << std::string("[") << ClientCfg.VRDisplayDevice << "] [" << ClientCfg.VRDisplayDeviceId<< "] [DEVICE NOT FOUND]";
pCB->addText(ucstring(displayname.str())); pCB->addText(displayname.str());
selectedDevice = VRDeviceCache.size(); selectedDevice = VRDeviceCache.size();
} }
NLGUI::CDBManager::getInstance()->getDbProp(GAME_CONFIG_VR_DEVICE_DB)->setValue32(-1); NLGUI::CDBManager::getInstance()->getDbProp(GAME_CONFIG_VR_DEVICE_DB)->setValue32(-1);
@ -3062,7 +3062,7 @@ public:
{ {
pCB->resetTexts(); pCB->resetTexts();
for (sint j = 0; j < (sint)stringModeList.size(); j++) for (sint j = 0; j < (sint)stringModeList.size(); j++)
pCB->addText(ucstring(stringModeList[j])); pCB->addText(stringModeList[j]);
} }
// frequencies // frequencies
@ -3071,7 +3071,7 @@ public:
{ {
pCB->resetTexts(); pCB->resetTexts();
for (sint j = 0; j < (sint)stringFreqList.size(); j++) for (sint j = 0; j < (sint)stringFreqList.size(); j++)
pCB->addText(ucstring(stringFreqList[j])); pCB->addText(stringFreqList[j]);
} }
// -1 is important to indicate we set this value in edit mode // -1 is important to indicate we set this value in edit mode
@ -3094,10 +3094,10 @@ public:
if( pCB ) if( pCB )
{ {
pCB->resetTexts(); pCB->resetTexts();
pCB->addText(CI18N::get("uigcLowTextureMode")); pCB->addText(CI18N::get("uigcLowTextureMode").toUtf8());
pCB->addText(CI18N::get("uigcNormalTextureMode")); pCB->addText(CI18N::get("uigcNormalTextureMode").toUtf8());
if(ClientCfg.HDTextureInstalled) if(ClientCfg.HDTextureInstalled)
pCB->addText(CI18N::get("uigcHighTextureMode")); pCB->addText(CI18N::get("uigcHighTextureMode").toUtf8());
} }
// Anisotropic Filtering // Anisotropic Filtering
@ -3110,14 +3110,14 @@ public:
sint maxAnisotropic = (sint)Driver->getAnisotropicFilterMaximum(); sint maxAnisotropic = (sint)Driver->getAnisotropicFilterMaximum();
pCB->resetTexts(); pCB->resetTexts();
pCB->addText(CI18N::get("uigcFxAnisotropicFilterNone")); pCB->addText(CI18N::get("uigcFxAnisotropicFilterNone").toUtf8());
sint anisotropic = 2; sint anisotropic = 2;
uint i = 1; uint i = 1;
while (anisotropic <= maxAnisotropic) while (anisotropic <= maxAnisotropic)
{ {
pCB->addText(ucstring(NLMISC::toString("%dx", anisotropic))); pCB->addText(NLMISC::toString("%dx", anisotropic));
if (ClientCfg.AnisotropicFilter == anisotropic) if (ClientCfg.AnisotropicFilter == anisotropic)
nAnisotropic = i; nAnisotropic = i;
@ -3222,7 +3222,7 @@ class CHandlerGameConfigMode : public IActionHandler
// Get W, H // Get W, H
sint w,h; sint w,h;
{ {
string vidModeStr = pCB->getText(nVideModeNb).toString(); string vidModeStr = pCB->getText(nVideModeNb);
string tmp = vidModeStr.substr(0,vidModeStr.find('x')-1); string tmp = vidModeStr.substr(0,vidModeStr.find('x')-1);
fromString(tmp, w); fromString(tmp, w);
tmp = vidModeStr.substr(vidModeStr.find('x')+2,vidModeStr.size()); tmp = vidModeStr.substr(vidModeStr.find('x')+2,vidModeStr.size());
@ -3262,7 +3262,7 @@ class CHandlerGameConfigMode : public IActionHandler
{ {
pCB->resetTexts(); pCB->resetTexts();
for (j = 0; j < (sint)stringFreqList.size(); j++) for (j = 0; j < (sint)stringFreqList.size(); j++)
pCB->addText(ucstring(stringFreqList[j]) + " Hz"); pCB->addText(stringFreqList[j] + " Hz");
} }
NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(nFoundFreq); NLGUI::CDBManager::getInstance()->getDbProp( GAME_CONFIG_VIDEO_FREQ_DB )->setValue32(nFoundFreq);
@ -3464,7 +3464,7 @@ class CHandlerGameConfigApply : public IActionHandler
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO )); CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_MODES_COMBO ));
if( pCB != NULL ) if( pCB != NULL )
{ {
string vidModeStr = pCB->getText(nVideModeNb).toString(); string vidModeStr = pCB->getText(nVideModeNb);
string tmp = vidModeStr.substr(0,vidModeStr.find('x')-1); string tmp = vidModeStr.substr(0,vidModeStr.find('x')-1);
fromString(tmp, w); fromString(tmp, w);
tmp = vidModeStr.substr(vidModeStr.find('x')+2,vidModeStr.size()); tmp = vidModeStr.substr(vidModeStr.find('x')+2,vidModeStr.size());
@ -3478,7 +3478,7 @@ class CHandlerGameConfigApply : public IActionHandler
CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO )); CDBGroupComboBox *pCB = dynamic_cast<CDBGroupComboBox*>(CWidgetManager::getInstance()->getElementFromId( GAME_CONFIG_VIDEO_FREQS_COMBO ));
if( pCB != NULL ) if( pCB != NULL )
{ {
string vidFreqStr = pCB->getText(nVideoFreqNb).toString(); string vidFreqStr = pCB->getText(nVideoFreqNb);
fromString(vidFreqStr, freq); fromString(vidFreqStr, freq);
} }
} }

@ -2200,7 +2200,7 @@ static void setupRawMaterialStats(CSheetHelpSetup &setup)
if(pIS->canBuildItemPart(faberType)) if(pIS->canBuildItemPart(faberType))
{ {
pCB->addText(RM_FABER_TYPE::toLocalString(faberType)); pCB->addText(RM_FABER_TYPE::toLocalString(faberType).toUtf8());
} }
} }

@ -156,7 +156,7 @@ void CBotChatPageDynamicMission::update()
{ {
if (ClientCfg.Local) if (ClientCfg.Local)
{ {
_ChoiceCB[k]->setText(l, ucstring(toString("Dynamic mission %d:%d", (int) k, (int) l))); _ChoiceCB[k]->setText(l, toString("Dynamic mission %d:%d", (int) k, (int) l));
_TextReceived[k][l] = true; _TextReceived[k][l] = true;
} }
else else
@ -167,7 +167,7 @@ void CBotChatPageDynamicMission::update()
bool received = CStringManagerClient::instance()->getDynString(textID, result); bool received = CStringManagerClient::instance()->getDynString(textID, result);
if (received) if (received)
{ {
_ChoiceCB[k]->setText(l, result); _ChoiceCB[k]->setText(l, result.toUtf8());
_TextReceived[k][l] = true; _TextReceived[k][l] = true;
} }
} }
@ -183,13 +183,13 @@ void CBotChatPageDynamicMission::update()
bool received = CStringManagerClient::instance()->getDynString(textID, result); bool received = CStringManagerClient::instance()->getDynString(textID, result);
if (received) if (received)
{ {
_ChoiceCB[k]->addText(result); _ChoiceCB[k]->addText(result.toUtf8());
_TextReceived[k][l] = true; _TextReceived[k][l] = true;
} }
else else
{ {
// add a text to show the player that the text is being received // add a text to show the player that the text is being received
_ChoiceCB[k]->addText(NLMISC::CI18N::get("uiWaitingChoiceFromServer")); _ChoiceCB[k]->addText(NLMISC::CI18N::get("uiWaitingChoiceFromServer").toUtf8());
} }
} }
} }

@ -492,7 +492,7 @@ void CModalContainerEditCmd::activate()
} }
if (found) if (found)
{ {
pCB->addText( CI18N::get(rVCat[i].LocalizedName) ); pCB->addText(CI18N::get(rVCat[i].LocalizedName).toUtf8());
CurrentEditCmdCategories.push_back(rVCat[i].Name); CurrentEditCmdCategories.push_back(rVCat[i].Name);
} }
} }
@ -1033,7 +1033,7 @@ void CModalContainerEditCmd::onChangeCategory()
{ {
if (rBA.isUsableInCurrentContext()) if (rBA.isUsableInCurrentContext())
{ {
pCB->addText( CI18N::get(rBA.LocalizedName) ); pCB->addText(CI18N::get(rBA.LocalizedName).toUtf8());
} }
} }
} }
@ -1130,11 +1130,10 @@ void CModalContainerEditCmd::onChangeAction()
if (ActionsContext.matchContext(rVal.Contexts)) if (ActionsContext.matchContext(rVal.Contexts))
{ {
if ((rVal.LocalizedValue.size() >= 2) && if (NLMISC::startsWith(rVal.LocalizedValue, "ui"))
(rVal.LocalizedValue[0] == 'u') && (rVal.LocalizedValue[1] == 'i')) pCB->addText(CI18N::get(rVal.LocalizedValue).toUtf8());
pCB->addText(CI18N::get(rVal.LocalizedValue));
else else
pCB->addText(ucstring(rVal.LocalizedValue)); pCB->addText(rVal.LocalizedValue);
} }
} }
} }

@ -1097,7 +1097,7 @@ public:
string titleStr = CHARACTER_TITLE::toString((CHARACTER_TITLE::ECharacterTitle)i); string titleStr = CHARACTER_TITLE::toString((CHARACTER_TITLE::ECharacterTitle)i);
bool womenTitle = (UserEntity && UserEntity->getGender() == GSGENDER::female); bool womenTitle = (UserEntity && UserEntity->getGender() == GSGENDER::female);
const ucstring s(CStringManagerClient::getTitleLocalizedName(titleStr,womenTitle)); const ucstring s(CStringManagerClient::getTitleLocalizedName(titleStr,womenTitle));
pCB->addText(s); pCB->addText(s.toUtf8());
pSM->_UIUnblockedTitles.push_back((CHARACTER_TITLE::ECharacterTitle)i); pSM->_UIUnblockedTitles.push_back((CHARACTER_TITLE::ECharacterTitle)i);
} }
} }

Loading…
Cancel
Save