|
|
|
@ -50,7 +50,7 @@ extern NL3D::UMaterial LoadingMaterialFull;
|
|
|
|
|
|
|
|
|
|
extern std::vector<UTextureFile*> LogoBitmaps;
|
|
|
|
|
extern uint TipsOfTheDayIndex;
|
|
|
|
|
extern ucstring TipsOfTheDay;
|
|
|
|
|
extern string TipsOfTheDay;
|
|
|
|
|
extern bool UseEscapeDuringLoading;
|
|
|
|
|
|
|
|
|
|
CProgress::CProgress ()
|
|
|
|
@ -287,8 +287,8 @@ void CProgress::internalProgress (float value)
|
|
|
|
|
// Display the tips of the day.
|
|
|
|
|
TextContext->setFontSize((uint)(16.f * fontFactor));
|
|
|
|
|
TextContext->setHotSpot(UTextContext::MiddleTop);
|
|
|
|
|
ucstring::size_type index = 0;
|
|
|
|
|
ucstring::size_type end = TipsOfTheDay.find((ucchar)'\n');
|
|
|
|
|
string::size_type index = 0;
|
|
|
|
|
string::size_type end = TipsOfTheDay.find('\n');
|
|
|
|
|
if (end == string::npos)
|
|
|
|
|
end = TipsOfTheDay.size();
|
|
|
|
|
float fY = ClientCfg.TipsY;
|
|
|
|
@ -297,15 +297,15 @@ void CProgress::internalProgress (float value)
|
|
|
|
|
while (index < end)
|
|
|
|
|
{
|
|
|
|
|
// Get the line
|
|
|
|
|
ucstring line = TipsOfTheDay.substr (index, end-index);
|
|
|
|
|
string line = TipsOfTheDay.substr (index, end-index);
|
|
|
|
|
|
|
|
|
|
// Draw the line
|
|
|
|
|
TextContext->printAt(0.5f, fY, line);
|
|
|
|
|
fY = nextLine (TextContext->getFontSize(), Driver->getWindowHeight(), fY);
|
|
|
|
|
|
|
|
|
|
index=end+1;
|
|
|
|
|
end = TipsOfTheDay.find((ucchar)'\n', index);
|
|
|
|
|
if (end == ucstring::npos)
|
|
|
|
|
end = TipsOfTheDay.find('\n', index);
|
|
|
|
|
if (end == string::npos)
|
|
|
|
|
end = TipsOfTheDay.size();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -338,7 +338,7 @@ void CProgress::internalProgress (float value)
|
|
|
|
|
TextContext->setFontSize((uint)(15.f * fontFactor));
|
|
|
|
|
TextContext->setHotSpot(UTextContext::BottomLeft);
|
|
|
|
|
|
|
|
|
|
ucstring uc = CI18N::get("uiR2EDTPEscapeToInteruptLoading") + " (" + _TPCancelText + ") - " + CI18N::get("uiDelayedTPCancel");
|
|
|
|
|
string uc = CI18N::get("uiR2EDTPEscapeToInteruptLoading") + " (" + _TPCancelText.toUtf8() + ") - " + CI18N::get("uiDelayedTPCancel");
|
|
|
|
|
UTextContext::CStringInfo info = TextContext->getStringInfo(uc);
|
|
|
|
|
float stringX = 0.5f - info.StringWidth/(ClientCfg.Width*2);
|
|
|
|
|
TextContext->printAt(stringX, 7.f / ClientCfg.Height, uc);
|
|
|
|
@ -386,13 +386,13 @@ void CProgress::internalProgress (float value)
|
|
|
|
|
TextContext->setFontSize( (uint)(16.f * fontFactor));
|
|
|
|
|
|
|
|
|
|
// build the ucstr(s)
|
|
|
|
|
ucstring ucstr = CI18N::get((*itpc).Text);
|
|
|
|
|
vector<ucstring> vucstr;
|
|
|
|
|
ucstring sep("\n");
|
|
|
|
|
splitUCString(ucstr,sep,vucstr);
|
|
|
|
|
string ucstr = CI18N::get((*itpc).Text);
|
|
|
|
|
vector<string> vucstr;
|
|
|
|
|
string sep("\n");
|
|
|
|
|
splitString(ucstr,sep,vucstr);
|
|
|
|
|
|
|
|
|
|
// Letter size
|
|
|
|
|
UTextContext::CStringInfo si = TextContext->getStringInfo(ucstring("|"));
|
|
|
|
|
UTextContext::CStringInfo si = TextContext->getStringInfo("|");
|
|
|
|
|
uint fontHeight = (uint) si.StringHeight + 2; // we add 2 pixels for the gap
|
|
|
|
|
|
|
|
|
|
uint i;
|
|
|
|
|