mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00: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:
parent
fab3f5f7c8
commit
1892ff3c0d
9 changed files with 224 additions and 205 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue