From c56df48d7526972b1b25f76bdbc2aae180006f6f Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 28 Apr 2020 21:49:15 -0700 Subject: [PATCH] Interpolate text box alpha This makes text boxes fade in and out pretty smoothly. This requires that the textboxclass::setcol() be in Graphics::drawgui(), so now it's moved there. Text box fading is only really noticeable if you're playing in slowmode. --- desktop_version/src/Graphics.cpp | 4 ++++ desktop_version/src/Textbox.cpp | 4 ++-- desktop_version/src/Textbox.h | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 32f3d7de..e56a1329 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -609,6 +609,10 @@ void Graphics::drawgui() //Draw all the textboxes to the screen for (size_t i = 0; i 0) { diff --git a/desktop_version/src/Textbox.h b/desktop_version/src/Textbox.h index d30cdd5e..4b084c73 100644 --- a/desktop_version/src/Textbox.h +++ b/desktop_version/src/Textbox.h @@ -40,6 +40,7 @@ public: int timer; float tl; + float prev_tl; int tm; int max;