mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2026-02-04 17:19:09 +00:00
fix(ui): fix CSimpleFontString to use the FixedColor flag only if the string does not contain color tags
This commit is contained in:
parent
665b8862fd
commit
a2e1dc98a2
2 changed files with 13 additions and 5 deletions
|
|
@ -876,9 +876,17 @@ void CSimpleFontString::UpdateString() {
|
|||
uint32_t styleFlags = this->m_styleFlags;
|
||||
|
||||
if (!(this->m_styleFlags & 0x400)) {
|
||||
// TODO
|
||||
|
||||
styleFlags |= 0x400;
|
||||
// Set FixedColor flag if the text does not contain color tags
|
||||
bool found = false;
|
||||
for (size_t i = 0; displayText && displayText[i]; ++i) {
|
||||
if (displayText[i] == '|' && (displayText[i + 1] == 'C' || displayText[i + 1] == 'c')) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
styleFlags |= 0x400u;
|
||||
}
|
||||
}
|
||||
|
||||
CImVector color = { 0xFF, 0xFF, 0xFF, 0xFF };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue