Add: {COLOUR} control code to allow colour changes at runtime

This commit is contained in:
glx22
2023-04-15 04:32:13 +02:00
committed by Loïc Guilloux
parent 88138c55f8
commit b1fb209bed
3 changed files with 8 additions and 0 deletions

View File

@@ -1624,6 +1624,12 @@ static void FormatString(StringBuilder &builder, const char *str_arg, StringPara
break;
}
case SCC_COLOUR: { // {COLOUR}
StringControlCode scc = (StringControlCode)(SCC_BLUE + args.GetInt32(SCC_COLOUR));
if (IsInsideMM(scc, SCC_BLUE, SCC_COLOUR)) builder.Utf8Encode(scc);
break;
}
default:
builder.Utf8Encode(b);
break;