From 954151ca7328fd9d19550a327f4f5433ee4dbd4b Mon Sep 17 00:00:00 2001 From: Ulukyn Date: Tue, 21 Jan 2020 15:04:43 +0100 Subject: [PATCH] Added: new way to manage news at loading screen --- code/ryzom/client/src/global.cpp | 1 + code/ryzom/client/src/interface_v3/lua_ihm_ryzom.cpp | 11 +++++++++++ code/ryzom/client/src/interface_v3/lua_ihm_ryzom.h | 1 + code/ryzom/client/src/progress.cpp | 10 ++++++++-- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/global.cpp b/code/ryzom/client/src/global.cpp index 4b8e1aad7..d5113e0a9 100644 --- a/code/ryzom/client/src/global.cpp +++ b/code/ryzom/client/src/global.cpp @@ -78,6 +78,7 @@ std::vector LogoBitmaps; extern uint TipsOfTheDayIndex; extern ucstring TipsOfTheDay; +extern string NewsAtProgress; extern bool UseEscapeDuringLoading; CProgress::CProgress () @@ -379,10 +380,15 @@ void CProgress::internalProgress (float value) float x = 0.5f;//((*itpc).X / 1024.f); float y = ((*itpc).Y / 768.f); TextContext->setColor( (*itpc).Color ); - TextContext->setFontSize( (uint)(16.f * fontFactor)); + TextContext->setFontSize( (uint)((*itpc).FontSize * fontFactor)); // 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 vucstr; ucstring sep("\n"); splitUCString(ucstr,sep,vucstr);