1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

StaticText/EnrichedString: Styling support (#9187)

* StaticText/EnrichedString: Styling support

* Fix tooltip fg/bgcolor

* Fix default color for substr(), add unittests
This commit is contained in:
SmallJoker
2020-01-22 19:09:11 +01:00
committed by GitHub
parent fab3f5f7c8
commit 1892ff3c0d
9 changed files with 224 additions and 205 deletions

View File

@@ -155,7 +155,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 +169,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()) {