From f9525020bbcb4c2f5c44218cadcd475bcc1d2037 Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Wed, 22 Jan 2020 17:20:32 -0800 Subject: [PATCH] Call nexttowercolour() when exiting to menu This fixes a bug where you could get mismatched text and background colors on the menu screen by being in the Tower and exiting at a certain time. The background when mismatched will always be red, which seems to have something to do with the fact that when you enter the Tower the game always sets the background to be red. I could get a quick repro setup going by starting in the checkpoint in Teleporter Divot, then quickly entering the Tower, exiting, then re-entering, then pressing Esc and quitting - all done very quickly. The important thing about this mismatch is that it's only temporary, and will be corrected when you press ACTION and the color of the text and background in the menu both change at the same time, which is what map.nexttowercolour() does. So all I do is simply call that function when exiting to the menu, and it will fix the color mismatch. --- desktop_version/src/Input.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index f47ee97a..c595dd24 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -2336,6 +2336,7 @@ void mapinput(KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, if(dwgfx.setflipmode) dwgfx.flipmode = true; dwgfx.fademode = 2; music.fadeout(); + map.nexttowercolour(); } }