1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

HUD: Text element color support (#14558)

This commit is contained in:
SmallJoker 2024-04-20 20:36:44 +02:00 committed by GitHub
parent d2a089ffd9
commit c8a41409d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 39 additions and 12 deletions

View file

@ -1777,12 +1777,7 @@ void GUIFormSpecMenu::parseLabel(parserData* data, const std::string &element)
size_t str_pos = 0;
for (size_t i = 0; str_pos < str.size(); ++i) {
// Split per line
size_t str_nl = str.getString().find(L'\n', str_pos);
if (str_nl == std::wstring::npos)
str_nl = str.getString().size();
EnrichedString line = str.substr(str_pos, str_nl - str_pos);
str_pos += line.size() + 1;
EnrichedString line = str.getNextLine(&str_pos);
core::rect<s32> rect;