Closed XertroV closed 3 months ago
In Openplanet, \$tXX
changes the transparency of the text, as an Openplanet-specific feature. This stems from before Trackmania had this formatting option. As this conflicts, I've changed it to \$jXX
(it wasn't really being used anywhere, and $j
appears unused by the game).
I've also added support for \$i
.
if (UI::Begin("Test")) {
UI::Text("Normal");
UI::Text("\\$f00Red");
UI::Text("\\$iItalics");
UI::Text("\\$tUppercase");
UI::Text("\\$wWide");
UI::Text("\\$nNarrow");
UI::Text("\\$oBold");
}
UI::End();
The rest will remain unsupported due to how the way we do formatting in ImGui, but they will consume the character as expected.
expected behavior is going by https://wiki.trackmania.io/en/content-creation/text-styling
\\$i
printsi
(expected: nothing or italics)\\$t
consumes the next character (tested1
andx
and expected1
andX
) -- should force uppercase\\$w
printsw
(expected: nothing or wide text)\\$n
printsn
(expected: nothing or narrow text)\\$o
printso
(expected: nothing or bold)Note: i think the wiki incorrectly says that
$$
should print$$
, but as an escape it should obviously print$
.