From c02bd9235fca8d3308346fc88b2be4c0e9a33139 Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 12 Jun 2021 15:19:15 -0700 Subject: [PATCH] Outline text outline text and draw backing In order to help players spot the difference between outlined text and non-outlined text, we now outline the text outline text itself (if text outline is enabled, of course). But drawing the outline alone doesn't stand out enough, so we have to draw a solid backing against the text as well, in order to properly show the contrast. --- desktop_version/src/Render.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/desktop_version/src/Render.cpp b/desktop_version/src/Render.cpp index edbcd534..865e0271 100644 --- a/desktop_version/src/Render.cpp +++ b/desktop_version/src/Render.cpp @@ -5,6 +5,7 @@ #include "Entity.h" #include "FileSystemUtils.h" #include "Graphics.h" +#include "GraphicsUtil.h" #include "KeyPoll.h" #include "MakeAndPlay.h" #include "Map.h" @@ -710,19 +711,28 @@ static void menurender(void) } break; case OFFSET+4: + { + const char* text; + graphics.bigprint(-1, 40, "Text Outline", tr, tg, tb, true); graphics.Print(-1, 75, "Disables outline on game text.", tr, tg, tb, true); - // FIXME: Maybe do an outlined print instead? -flibit + + FillRect(graphics.backBuffer, 0, 84, 320, 10, tr, tg, tb); + if (!graphics.notextoutline) { - graphics.Print(-1, 85, "Text outlines are ON.", tr, tg, tb, true); + text = "Text outlines are ON."; } else { - graphics.Print(-1, 85, "Text outlines are OFF.", tr / 2, tg / 2, tb / 2, true); + text = "Text outlines are OFF."; } + + graphics.bprint(-1, 85, text, 255, 255, 255, true); break; } + + } break; #undef OFFSET