From d49bbad1a8fe6f57e0a4ae706e7788d5b0d643e2 Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 6 May 2013 05:41:04 +0200 Subject: hide/show the HUD smoothly when in a menu --- src/koopatlas/hud.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 592d3b2..ff9a0e2 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -183,10 +183,14 @@ int dWMHud_c::onDraw() { void dWMHud_c::hideAll() { - layout.enableNonLoopAnim(HIDE_ALL); + if (!layout.isAnimOn(HIDE_ALL)) + layout.enableNonLoopAnim(HIDE_ALL); + layout.grpHandlers[HIDE_ALL].frameCtrl.flags = 1; // NO_LOOP } void dWMHud_c::unhideAll() { - layout.enableNonLoopAnim(UNHIDE_ALL); + if (!layout.isAnimOn(HIDE_ALL)) + layout.enableNonLoopAnim(HIDE_ALL, true); + layout.grpHandlers[HIDE_ALL].frameCtrl.flags = 3; // NO_LOOP | REVERSE } -- cgit v1.2.3