diff options
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r-- | src/koopatlas/hud.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index 4d678c6..1032512 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -24,7 +24,9 @@ dWMHud_c::dWMHud_c() { enum WMHudAnimation { SHOW_LIVES = 0, SHOW_HEADER, - SHOW_FOOTER + SHOW_FOOTER, + HIDE_ALL, + UNHIDE_ALL, }; @@ -46,16 +48,23 @@ int dWMHud_c::onCreate() { layout.layout.rootPane->scale.y = 0.7711f; } - static const char *brlanNames[2] = {"MapHUD_ShowMain.brlan", "MapHUD_ShowHeader.brlan"}; - static const char *groupNames[3] = {"G_Lives", "G_Header", "G_Footer"}; + static const char *brlanNames[] = { + "MapHUD_ShowMain.brlan", "MapHUD_ShowHeader.brlan", + "MapHUD_HideAll.brlan", "MapHUD_UnhideAll.brlan", + }; + static const char *groupNames[] = { + "G_Lives", "G_Header", "G_Footer", + "G_Hideables", "G_Hideables", + }; - layout.loadAnimations(brlanNames, 2); - layout.loadGroups(groupNames, (int[3]){0, 1, 0}, 3); + layout.loadAnimations(brlanNames, 4); + layout.loadGroups(groupNames, (int[5]){0, 1, 0, 2, 3}, 5); layout.disableAllAnimations(); layout.enableNonLoopAnim(SHOW_LIVES); layout.resetAnim(SHOW_FOOTER); layout.resetAnim(SHOW_HEADER); + layout.resetAnim(HIDE_ALL); static const char *tbNames[2] = {"MenuButtonInfo", "ItemsButtonInfo"}; layout.setLangStrings(tbNames, (int[2]){12, 15}, 4, 2); @@ -162,6 +171,14 @@ int dWMHud_c::onDraw() { } +void dWMHud_c::hideAll() { + layout.enableNonLoopAnim(HIDE_ALL); +} +void dWMHud_c::unhideAll() { + layout.enableNonLoopAnim(UNHIDE_ALL); +} + + void dWMHud_c::playShowAnim(int id) { |