develop
kaetemi 4 years ago
parent 52e3ca024f
commit c27547c3a3

@ -2413,7 +2413,7 @@ void CInterfaceManager::messageBox(const ucstring &text, const string &masterGro
// ------------------------------------------------------------------------------------------------
void CInterfaceManager::messageBoxWithHelp(const ucstring &text, const std::string &masterGroup,
void CInterfaceManager::messageBoxWithHelp(const std::string &text, const std::string &masterGroup,
const std::string &ahOnOk, const std::string &paramsOnOk,
TCaseMode caseMode)
{

@ -310,7 +310,7 @@ public:
* The help button with open a browser on ryzom.com faq
* ui:interface:message_box_with_help must be defined in xml, with a "text" ViewText son
*/
void messageBoxWithHelp(const ucstring &text, const std::string &masterGroup="ui:interface",
void messageBoxWithHelp(const std::string &text, const std::string &masterGroup="ui:interface",
const std::string &ahOnOk = std::string(), const std::string &paramsOnOk= std::string(),
TCaseMode caseMode = CaseFirstSentenceLetterUp);

@ -527,9 +527,9 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
luabind::def("messageBox", (void(*)(const ucstring &, const std::string &)) &messageBox),
luabind::def("messageBox", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBox),
luabind::def("messageBox", (void(*)(const std::string &)) &messageBox),
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &)) &messageBoxWithHelp),
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &, const std::string &)) &messageBoxWithHelp),
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBoxWithHelp),
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &)) &messageBoxWithHelp), // TODO: Lua UTF-8
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &, const std::string &)) &messageBoxWithHelp), // TODO: Lua UTF-8
luabind::def("messageBoxWithHelp", (void(*)(const ucstring &, const std::string &, int caseMode)) &messageBoxWithHelp), // TODO: Lua UTF-8
luabind::def("messageBoxWithHelp", (void(*)(const std::string &)) &messageBoxWithHelp),
LUABIND_FUNC(replacePvpEffectParam),
LUABIND_FUNC(secondsSince1970ToHour),
@ -2929,23 +2929,23 @@ void CLuaIHMRyzom::messageBox(const std::string &text)
}
// ***************************************************************************
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text)
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text) // TODO: Lua UTF-8
{
//H_AUTO(Lua_CLuaIHM_messageBox)
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->messageBoxWithHelp(text);
pIM->messageBoxWithHelp(text.toUtf8());
}
// ***************************************************************************
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text, const std::string &masterGroup)
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text, const std::string &masterGroup) // TODO: Lua UTF-8
{
//H_AUTO(Lua_CLuaIHM_messageBox)
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->messageBoxWithHelp(text, masterGroup);
pIM->messageBoxWithHelp(text.toUtf8(), masterGroup);
}
// ***************************************************************************
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text, const std::string &masterGroup, int caseMode)
void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text, const std::string &masterGroup, int caseMode) // TODO: Lua UTF-8
{
if (caseMode < 0 || caseMode >= CaseCount)
{
@ -2954,7 +2954,7 @@ void CLuaIHMRyzom::messageBoxWithHelp(const ucstring &text, const std::string &
//H_AUTO(Lua_CLuaIHM_messageBox)
CInterfaceManager *pIM = CInterfaceManager::getInstance();
pIM->messageBoxWithHelp(text, masterGroup, "" , "", (TCaseMode) caseMode);
pIM->messageBoxWithHelp(text.toUtf8(), masterGroup, "" , "", (TCaseMode) caseMode);
}
// ***************************************************************************

@ -243,7 +243,7 @@ void createOptionalCatUI()
pVT = dynamic_cast<CViewText*>(pNewLine->getView("size"));
if (pVT != NULL)
{
pVT->setText(BGDownloader::getWrittenSize(InfoOnPatch.OptCat[i].Size).toUtf8());
pVT->setText(BGDownloader::getWrittenSize(InfoOnPatch.OptCat[i].Size));
}
// Add to the list
@ -467,8 +467,8 @@ void loginMainLoop()
bool res = false;
BGDownloader::TTaskResult taskResult = BGDownloader::TaskResult_Unknown;
bool finished = false;
ucstring bgDownloaderError;
#ifdef RYZOM_BG_DOWNLOADER
string bgDownloaderError;
if (isBGDownloadEnabled())
{
finished = bgDownloader.isTaskEnded(taskResult, bgDownloaderError);
@ -657,7 +657,7 @@ void loginMainLoop()
totalPatchSize = bgDownloader.getTotalSize();
BGDownloader::TTaskResult taskResult;
bool finished = false;
ucstring bgDownloaderError;
string bgDownloaderError;
finished = bgDownloader.isTaskEnded(taskResult, bgDownloaderError);
if (finished)
{
@ -670,8 +670,8 @@ void loginMainLoop()
if (taskResult == BGDownloader::TaskResult_Error)
{
setPatcherStateText("ui:login:patching", ucstring());
setPatcherProgressText("ui:login:patching", ucstring());
setPatcherStateText("ui:login:patching", string());
setPatcherProgressText("ui:login:patching", string());
if (!fatalMessageBoxShown)
{
@ -723,10 +723,10 @@ void loginMainLoop()
}
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TOTAL_SIZE_PATCH));
ucstring sTmp;
string sTmp;
sTmp = BGDownloader::getWrittenSize(currentPatchingSize);
sTmp += " / " + BGDownloader::getWrittenSize(totalPatchSize);
if (pVT != NULL) pVT->setText(sTmp.toUtf8());
if (pVT != NULL) pVT->setText(sTmp);
}
// else if (screen == UI_VARIABLES_SCREEN_CATDISP) // If we are displaying patch info
else if (LoginSM.getCurrentState() == CLoginStateMachine::st_display_cat)
@ -775,10 +775,10 @@ void loginMainLoop()
// Total size of the patches is optional cats + required cat (f(optCat)) + non opt cat
CViewText *pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_TOTAL_SIZE));
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(TotalPatchSize).toUtf8());
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(TotalPatchSize));
pVT = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId(VIEW_NON_OPTIONAL_SIZE));
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(nNonOptSize).toUtf8());
if (pVT != NULL) pVT->setText(BGDownloader::getWrittenSize(nNonOptSize));
}
}
}
@ -802,7 +802,7 @@ void initLoginScreen()
// version
std::string ext;
if (ClientApp.find("ryzom_") != ucstring::npos)
if (ClientApp.find("ryzom_") != string::npos)
ext = " (" + ClientApp.substr(6) + ")";
CViewText *pV = dynamic_cast<CViewText*>(CWidgetManager::getInstance()->getElementFromId("ui:login:checkpass:content:ver_value"));
@ -1878,7 +1878,7 @@ class CAHReboot : public IActionHandler
}
catch (const std::exception &e)
{
im->messageBoxWithHelp(ucstring::makeFromUtf8(e.what()), "ui:login", "login_quit");
im->messageBoxWithHelp(e.what(), "ui:login", "login_quit");
}
}
};
@ -2354,10 +2354,6 @@ inline string parseTooltip(const string & initString, const string & tagName)
tooltip = tooltip.substr(0, tooltip.find("<"));
}
ucstring uc;
uc.fromUtf8(tooltip);;
tooltip = uc.toString();
return tooltip;
}
@ -2377,10 +2373,6 @@ inline string parseCommentError(const string & initString, const string & tagNam
error = error.substr(0, error.find("<"));
}
ucstring uc;
uc.fromUtf8(error);;
error = uc.toString();
return error;
}
@ -3304,7 +3296,7 @@ void loginIntro()
if (i != 0)
{
beginLoading(IntroNVidia);
ucstring nmsg("");
string nmsg("");
ProgressBar.newMessage (nmsg);
}
@ -3330,7 +3322,7 @@ void loginIntro()
Driver->AsyncListener.isKeyPushed (KeySPACE))
break;
const ucstring nmsg("");
const string nmsg("");
ProgressBar.newMessage (nmsg);
IngameDbMngr.flushObserverCalls();
NLGUI::CDBManager::getInstance()->flushObserverCalls();

@ -879,7 +879,7 @@ NLMISC::CRGBA interpClientCfgColor(const string &src, string &dest)
if (src[0] == '&')
{
string::size_type nextPos = src.find('&', 1);
if (nextPos != ucstring::npos)
if (nextPos != string::npos)
{
std::string colorCode;
colorCode.resize(nextPos - 1);
@ -980,7 +980,7 @@ std::string getStringCategoryIfAny(const string &src, string &dest)
// ***************************************************************************
sint ucstrnicmp(const ucstring &s0, uint p0, uint n0, const ucstring &s1)
sint ucstrnicmp(const ucstring &s0, uint p0, uint n0, const ucstring &s1) // OLD
{
// start
const ucchar *start1= s1.c_str();

@ -193,8 +193,8 @@ enum TFilter3d
RYZOM_MAX_FILTER_3D,
};
// compare 2 ucstring s0 and s1, without regard to case. give start and size for sequence p0
sint ucstrnicmp(const ucstring &s0, uint p0, uint n0, const ucstring &s1);
// compare 2 ucstring s0 and s1, without regard to case. give start and size for sequence p0 // OLD
sint ucstrnicmp(const ucstring &s0, uint p0, uint n0, const ucstring &s1); // OLD
/** Compute a non-continuous noise with uniform repartition in [0, 1], with the given noise object
* By default repartition is not uniform for noise

@ -4340,7 +4340,7 @@ NLMISC_COMMAND(testDuelInvite, "","")
//{
// uint32 index;
// fromString(args[0], index);
// ucstring ucstr = args[1];
// ucstring ucstr = args[1]; // OLD
//
// vector<bool> code;
//

@ -26,10 +26,10 @@ namespace BGDownloader
const wchar_t *DownloaderMutexName = L"RyzomBgDownloader";
ucstring getWrittenSize(uint32 nSize)
std::string getWrittenSize(uint32 nSize)
{
float fSize = ((float)nSize)/(1024.0f*1024.0f);
ucstring ucs = NLMISC::toString("%.1f", fSize) + " " + NLMISC::CI18N::get("uiMb");
std::string ucs = NLMISC::toString("%.1f", fSize) + " " + NLMISC::CI18N::get("uiMb");
return ucs;
}

@ -137,7 +137,7 @@ extern const wchar_t *DownloaderMutexName;
// get patch written size in megabytes
ucstring getWrittenSize(uint32 nSize);
std::string getWrittenSize(uint32 nSize);
std::string toString(TMsgType msgType);

Loading…
Cancel
Save