diff options
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index ea6112262..d8cc42011 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -56,7 +56,7 @@ Gui *gui = nullptr; SDLInput *guiInput = nullptr; // Bolded font -gcn::Font *boldFont = nullptr; +SDLFont *boldFont = nullptr; class GuiConfigListener : public ConfigListener { @@ -244,19 +244,6 @@ void Gui::logic() ResourceManager *resman = ResourceManager::getInstance(); resman->clearScheduled(); - // Fade out mouse cursor after extended inactivity - if (mMouseInactivityTimer < 100 * 15) - { - ++mMouseInactivityTimer; - mMouseCursorAlpha = std::min(1.0f, mMouseCursorAlpha + 0.05f); - } - else - { - mMouseCursorAlpha = std::max(0.0f, mMouseCursorAlpha - 0.005f); - } - - Palette::advanceGradients(); - if (!mTop) return; @@ -264,14 +251,37 @@ void Gui::logic() handleModalMouseInputFocus(); if (mInput) - { -// mInput->_pollInput(); handleMouseInput(); - } mTop->logic(); } +void Gui::slowLogic() +{ + Palette::advanceGradients(); + + // Fade out mouse cursor after extended inactivity + if (mMouseInactivityTimer < 100 * 15) + { + ++mMouseInactivityTimer; + mMouseCursorAlpha = std::min(1.0f, mMouseCursorAlpha + 0.05f); + } + else + { + mMouseCursorAlpha = std::max(0.0f, mMouseCursorAlpha - 0.005f); + } + if (mGuiFont) + mGuiFont->slowLogic(); + if (mInfoParticleFont) + mInfoParticleFont->slowLogic(); + if (mHelpFont) + mHelpFont->slowLogic(); + if (mSecureFont) + mSecureFont->slowLogic(); + if (boldFont) + boldFont->slowLogic(); +} + bool Gui::handleInput() { if (mInput) |