diff --git a/src/states_screens/main_menu_screen.cpp b/src/states_screens/main_menu_screen.cpp index 8a11a2dac..10cd503c1 100644 --- a/src/states_screens/main_menu_screen.cpp +++ b/src/states_screens/main_menu_screen.cpp @@ -158,9 +158,9 @@ void MainMenuScreen::init() w->setBadge(LOADING_BADGE); } + m_news_text = L""; LabelWidget* w = getWidget("info_addons"); - const core::stringw &news_text = NewsManager::get()->getNextNewsMessage(); - w->setText(news_text, true); + w->setText(m_news_text, true); w->update(0.01f); #endif @@ -217,11 +217,15 @@ void MainMenuScreen::onUpdate(float delta) } LabelWidget* w = getWidget("info_addons"); - w->update(delta); - if(w->scrolledOff()) + if (m_news_text.empty()) + m_news_text = NewsManager::get()->getNextNewsMessage(); + if (!m_news_text.empty()) { - const core::stringw &news_text = NewsManager::get()->getNextNewsMessage(); - w->setText(news_text, true); + if (w->getText().empty()) + w->setText(m_news_text, true); + w->update(delta); + if (w->scrolledOff()) + w->setText(m_news_text, true); } PlayerProfile *player = PlayerManager::getCurrentPlayer(); diff --git a/src/states_screens/main_menu_screen.hpp b/src/states_screens/main_menu_screen.hpp index cf373e97b..ce495e3b8 100644 --- a/src/states_screens/main_menu_screen.hpp +++ b/src/states_screens/main_menu_screen.hpp @@ -35,6 +35,8 @@ private: /** Keep the widget to to the user name. */ GUIEngine::ButtonWidget *m_user_id; + core::stringw m_news_text; + MainMenuScreen(); void startTutorial();