summaryrefslogtreecommitdiff
path: root/src/koopatlas/hud.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r--src/koopatlas/hud.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp
index 90e769e..667feb2 100644
--- a/src/koopatlas/hud.cpp
+++ b/src/koopatlas/hud.cpp
@@ -156,6 +156,7 @@ dWMHud_c *dWMHud_c::build() {
dWMHud_c::dWMHud_c() {
layoutLoaded = false;
displayedControllerType = -1;
+ isFooterVisible = false;
}
enum WMHudAnimation {
@@ -267,6 +268,7 @@ int dWMHud_c::onExecute() {
if (willShowFooter && (!(layout.isAnimOn(SHOW_FOOTER)))) {
willShowFooter = false;
+ isFooterVisible = true;
loadFooterInfo();
playShowAnim(SHOW_FOOTER);
}
@@ -310,13 +312,15 @@ void dWMHud_c::playHideAnim(int id) {
layout.enableNonLoopAnim(id, true);
}
layout.grpHandlers[id].frameCtrl.flags = 3; // NO_LOOP | REVERSE
+ if (id == SHOW_FOOTER)
+ isFooterVisible = false;
}
void dWMHud_c::loadHeaderInfo() {
dLevelInfo_c *levelInfo = &dScKoopatlas_c::instance->levelInfo;
- dLevelInfo_c::entry_s *infEntry = levelInfo->search(
+ dLevelInfo_c::entry_s *infEntry = levelInfo->searchBySlot(
nodeForHeader->levelNumber[0]-1, nodeForHeader->levelNumber[1]-1);
if (infEntry == 0) {
@@ -434,9 +438,15 @@ void dWMHud_c::leftNode() {
}
-void dWMHud_c::hideAndShowFooter() {
+void dWMHud_c::hideFooter() {
+ if (isFooterVisible)
+ playHideAnim(SHOW_FOOTER);
+}
+
+void dWMHud_c::showFooter() {
willShowFooter = true;
- playHideAnim(SHOW_FOOTER);
+ if (isFooterVisible)
+ playHideAnim(SHOW_FOOTER);
}