diff options
author | Treeki <treeki@gmail.com> | 2012-09-25 23:03:30 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-09-25 23:03:30 +0200 |
commit | 46b65dfd76411bec6f8356c581f337f8a1944013 (patch) | |
tree | 016b4487a80bd6373589006e69b8c6bbbcf9188e /src/koopatlas/hud.cpp | |
parent | f4be7c3e4a44a6ec870eb61863a3d294da6f10ae (diff) | |
download | kamek-46b65dfd76411bec6f8356c581f337f8a1944013.tar.gz kamek-46b65dfd76411bec6f8356c581f337f8a1944013.zip |
added Remocon and GameMgr definitions, and made map HUD buttons work
Diffstat (limited to 'src/koopatlas/hud.cpp')
-rw-r--r-- | src/koopatlas/hud.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/koopatlas/hud.cpp b/src/koopatlas/hud.cpp index b7effce..c9124d2 100644 --- a/src/koopatlas/hud.cpp +++ b/src/koopatlas/hud.cpp @@ -14,6 +14,7 @@ dWMHud_c *dWMHud_c::build() { dWMHud_c::dWMHud_c() { layoutLoaded = false; + displayedControllerType = -1; } enum WMHudAnimation { @@ -112,6 +113,8 @@ int dWMHud_c::onExecute() { playShowHeaderAnim(); } + updatePressableButtonThingies(); + layout.execAnimations(); layout.update(); @@ -278,4 +281,19 @@ void dWMHud_c::setupLives() { N_IconPosXP_00[playerCount - 1]->SetVisible(true); } +void dWMHud_c::updatePressableButtonThingies() { + int cntType = RemoconMng->controllers[0]->controllerType; + + if (cntType != displayedControllerType) { + displayedControllerType = cntType; + + int beef = (cntType == 0) ? 0 : 1; + GameMgrP->currentControllerType = beef; + + WriteBMGToTextBox( + layout.findTextBoxByName("ItemsButtonInfo"), + GetBMG(), 4, 15, 0); + } +} + |