summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-12-02 12:35:06 +0100
committerGitHub <noreply@github.com>2020-12-02 12:35:06 +0100
commit774aa1570fc4985b1a713b5979ffe16719a991c0 (patch)
treecd49718c4ab2a9f3c899b7e6627055faa4b14406 /src/render/Font.cpp
parentcam lod dist fix (diff)
parentPlayerPed and "Redefine controls" menu done, fixes (diff)
downloadre3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.gz
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.bz2
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.lz
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.xz
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.tar.zst
re3-774aa1570fc4985b1a713b5979ffe16719a991c0.zip
Diffstat (limited to 'src/render/Font.cpp')
-rw-r--r--src/render/Font.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index 78a8599e..5a6ff94f 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -1437,3 +1437,21 @@ CFont::SetDropColor(CRGBA col)
if (Details.alphaFade < 255.0f)
Details.dropColor.a *= Details.alphaFade / 255.0f;
}
+
+void
+CFont::FilterOutTokensFromString(wchar *str)
+{
+ int newIdx = 0;
+ wchar copy[256], *c;
+ UnicodeStrcpy(copy, str);
+
+ for (c = copy; *c != '\0'; c++) {
+ if (*c == '~') {
+ c++;
+ while (*c != '~') c++;
+ } else {
+ str[newIdx++] = *c;
+ }
+ }
+ str[newIdx] = '\0';
+}