Merge remote-tracking branch 'origin/main' into fix/cast-anim-refresh-rate-decouple
This commit is contained in:
commit
77a20c742d
|
|
@ -113,6 +113,9 @@ export function parseFontTblMetrics(tblBytes: Uint8Array): {
|
|||
* Split a string containing Diablo II `ÿcX` color codes into colored spans.
|
||||
*/
|
||||
export function parseColoredText(input: string, defaultColor: D2ColorCode = 'white'): TextSpan[] {
|
||||
if (!input || typeof input !== 'string') {
|
||||
return []
|
||||
}
|
||||
const spans: TextSpan[] = []
|
||||
let currentColor: D2ColorCode = defaultColor
|
||||
let buf = ''
|
||||
|
|
|
|||
Loading…
Reference in New Issue