Merge branch 'ryzom/ui/improvements' into yubo

fix_opengl_on_mac
Ulukyn 5 years ago
commit d2edcbf4ee

@ -416,23 +416,15 @@ SystemInfoColors =
}; };
PrintfCommands = { PrintfCommands = {
"52", "15", "55 55 0 255", "28", "uiChapterV", "624", "0", "132", "30 144 255 255", "18", "uiS2",
"428", "0 0 0 255", "18", "", "624", "378", "0", "105", "255 188 0 255", "14", "uiS2E0",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255", "0", "65", "255 255 255 255", "12", "NEWS"
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
}; };
PrintfCommandsFreeTrial = { PrintfCommandsFreeTrial = {
"52", "15", "55 55 0 255", "28", "uiChapterV", "624", "0", "132", "30 144 255 255", "18", "uiS2",
"428", "0 0 0 255", "18", "", "624", "378", "0", "105", "255 188 0 255", "14", "uiS2E0",
"0 0 0 255", "14", "", "644", "278", "0 0 0 255", "0", "65", "255 255 255 255", "12", "NEWS"
"18", "", "52", "17", "255 255 255 255", "28",
"uiChapterV", "622", "430", "255 255 255 255", "18", "",
"622", "380", "255 255 255 255", "14", "", "642",
"280", "255 255 255 255", "18", ""
}; };
DisplayMissingAnimFile = 0; DisplayMissingAnimFile = 0;

@ -78,6 +78,7 @@ std::vector<std::pair<
/// Ring main page /// Ring main page
string RingMainURL; string RingMainURL;
string NewsAtProgress;
void resetTextContext (const char *font, bool resetInterfaceManager) void resetTextContext (const char *font, bool resetInterfaceManager)
{ {

@ -3053,7 +3053,7 @@ void getSabrinaBrickText(CSBrickSheet *pBR, ucstring &brickText)
// Display the part this slot build. // Display the part this slot build.
mpInfo+= "@{T4}"; mpInfo+= "@{T4}";
mpInfo+= RM_FABER_TYPE::toLocalString(mpSlot.FaberTypeFilter); mpInfo+= toString("%dx ", mpSlot.Quantity) + RM_FABER_TYPE::toLocalString(mpSlot.FaberTypeFilter);
mpInfo+= "\n"; mpInfo+= "\n";
} }
// replace in brickText // replace in brickText
@ -3074,7 +3074,7 @@ void getSabrinaBrickText(CSBrickSheet *pBR, ucstring &brickText)
// Display the required item // Display the required item
mpInfo+= "@{T4}"; mpInfo+= "@{T4}";
mpInfo+= STRING_MANAGER::CStringManagerClient::getItemLocalizedName(mpSlot.ItemRequired); mpInfo+= toString("%dx ", mpSlot.Quantity) + STRING_MANAGER::CStringManagerClient::getItemLocalizedName(mpSlot.ItemRequired);
mpInfo+= "\n"; mpInfo+= "\n";
} }
// replace in brickText // replace in brickText

@ -436,6 +436,7 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
ls.registerFunc("getDesktopIndex", getDesktopIndex); ls.registerFunc("getDesktopIndex", getDesktopIndex);
ls.registerFunc("setLuaBreakPoint", setLuaBreakPoint); ls.registerFunc("setLuaBreakPoint", setLuaBreakPoint);
ls.registerFunc("getMainPageURL", getMainPageURL); ls.registerFunc("getMainPageURL", getMainPageURL);
ls.registerFunc("setNewsAtProgress", setNewsAtProgress);
ls.registerFunc("getCharSlot", getCharSlot); ls.registerFunc("getCharSlot", getCharSlot);
ls.registerFunc("getServerSeason", getServerSeason); ls.registerFunc("getServerSeason", getServerSeason);
ls.registerFunc("computeCurrSeason", computeCurrSeason); ls.registerFunc("computeCurrSeason", computeCurrSeason);
@ -1145,6 +1146,16 @@ int CLuaIHMRyzom::getMainPageURL(CLuaState &ls)
return 1; return 1;
} }
// ***************************************************************************
int CLuaIHMRyzom::setNewsAtProgress(CLuaState &ls)
{
//H_AUTO(Lua_CLuaIHM_getMainPageURL)
const char *funcName = "NewsAtProgress";
CLuaIHM::checkArgType(ls, funcName, 1, LUA_TSTRING);
NewsAtProgress = ls.toString(1);
return 0;
}
// *************************************************************************** // ***************************************************************************
int CLuaIHMRyzom::getCharSlot(CLuaState &ls) int CLuaIHMRyzom::getCharSlot(CLuaState &ls)
{ {

@ -58,6 +58,7 @@ private:
static int getDesktopIndex(CLuaState &ls); static int getDesktopIndex(CLuaState &ls);
static int setLuaBreakPoint(CLuaState &ls); // set a breakpoint in lua external debugger (file, line) static int setLuaBreakPoint(CLuaState &ls); // set a breakpoint in lua external debugger (file, line)
static int getMainPageURL(CLuaState &ls); static int getMainPageURL(CLuaState &ls);
static int setNewsAtProgress(CLuaState &ls);
static int getCharSlot(CLuaState &ls); static int getCharSlot(CLuaState &ls);
static int displaySystemInfo(CLuaState &ls); static int displaySystemInfo(CLuaState &ls);
static int displayChatMessage(CLuaState &ls); static int displayChatMessage(CLuaState &ls);

@ -47,6 +47,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 ucstring TipsOfTheDay;
extern string NewsAtProgress;
extern bool UseEscapeDuringLoading; extern bool UseEscapeDuringLoading;
CProgress::CProgress () CProgress::CProgress ()
@ -379,10 +380,15 @@ void CProgress::internalProgress (float value)
float x = 0.5f;//((*itpc).X / 1024.f); float x = 0.5f;//((*itpc).X / 1024.f);
float y = ((*itpc).Y / 768.f); float y = ((*itpc).Y / 768.f);
TextContext->setColor( (*itpc).Color ); TextContext->setColor( (*itpc).Color );
TextContext->setFontSize( (uint)(16.f * fontFactor)); TextContext->setFontSize( (uint)((*itpc).FontSize * fontFactor));
// build the ucstr(s) // build the ucstr(s)
ucstring ucstr = CI18N::get((*itpc).Text); string text = (*itpc).Text;
ucstring ucstr;
if (text == "NEWS")
ucstr.fromUtf8(NewsAtProgress);
else
ucstr = CI18N::get(text);
vector<ucstring> vucstr; vector<ucstring> vucstr;
ucstring sep("\n"); ucstring sep("\n");
splitUCString(ucstr,sep,vucstr); splitUCString(ucstr,sep,vucstr);

Loading…
Cancel
Save