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