(2007f0f7e) Render missing characters as a white square to make them more noticeable

This commit is contained in:
Joonas Rikkonen
2019-05-06 11:37:11 +03:00
parent 323c8e7b95
commit 6f57aa863f
4 changed files with 36 additions and 304 deletions
@@ -214,8 +214,7 @@ namespace Barotrauma
continue;
}
uint charIndex = text[i];
GlyphData gd;
if (texCoords.TryGetValue(charIndex, out gd))
if (texCoords.TryGetValue(charIndex, out GlyphData gd) || texCoords.TryGetValue(9633, out gd)) //9633 = white square
{
if (gd.texIndex >= 0)
{
@@ -250,9 +249,8 @@ namespace Barotrauma
currentPos.Y += baseHeight * 1.8f;
continue;
}
uint charIndex = text[i];
GlyphData gd;
if (texCoords.TryGetValue(charIndex, out gd))
uint charIndex = text[i];
if (texCoords.TryGetValue(charIndex, out GlyphData gd) || texCoords.TryGetValue(9633, out gd)) //9633 = white square
{
if (gd.texIndex >= 0)
{