summaryrefslogtreecommitdiff
path: root/src/client/gameui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/gameui.cpp')
-rw-r--r--src/client/gameui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/gameui.cpp b/src/client/gameui.cpp
index 674d07fa6..138dfb4da 100644
--- a/src/client/gameui.cpp
+++ b/src/client/gameui.cpp
@@ -82,7 +82,6 @@ void GameUI::init()
core::rect<s32>(0, 0, 0, 0), false, false, guiroot);
m_guitext_profiler->setOverrideFont(g_fontengine->getFont(
g_fontengine->getDefaultFontSize() * 0.9f, FM_Mono));
- m_guitext_profiler->setBackgroundColor(video::SColor(120, 0, 0, 0));
m_guitext_profiler->setVisible(false);
}
@@ -155,7 +154,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
m_guitext2->setVisible(m_flags.show_debug);
- setStaticText(m_guitext_info, translate_string(m_infotext).c_str());
+ setStaticText(m_guitext_info, m_infotext.c_str());
m_guitext_info->setVisible(m_flags.show_hud && g_menumgr.menuCount() == 0);
static const float statustext_time_max = 1.5f;
@@ -169,7 +168,7 @@ void GameUI::update(const RunStats &stats, Client *client, MapDrawControl *draw_
}
}
- setStaticText(m_guitext_status, translate_string(m_statustext).c_str());
+ setStaticText(m_guitext_status, m_statustext.c_str());
m_guitext_status->setVisible(!m_statustext.empty());
if (!m_statustext.empty()) {
@@ -246,11 +245,12 @@ void GameUI::updateProfiler()
int lines = g_profiler->print(os, m_profiler_current_page, m_profiler_max_page);
++lines;
- std::wstring text = utf8_to_wide(os.str());
- setStaticText(m_guitext_profiler, text.c_str());
+ EnrichedString str(utf8_to_wide(os.str()));
+ str.setBackground(video::SColor(120, 0, 0, 0));
+ setStaticText(m_guitext_profiler, str);
core::dimension2d<u32> size = m_guitext_profiler->getOverrideFont()->
- getDimension(text.c_str());
+ getDimension(str.c_str());
core::position2di upper_left(6, 50);
core::position2di lower_right = upper_left;
lower_right.X += size.Width + 10;