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 | |
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')
-rw-r--r-- | src/koopatlas/hud.cpp | 18 | ||||
-rw-r--r-- | src/koopatlas/hud.h | 4 |
2 files changed, 21 insertions, 1 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); + } +} + diff --git a/src/koopatlas/hud.h b/src/koopatlas/hud.h index 07dde77..e507aea 100644 --- a/src/koopatlas/hud.h +++ b/src/koopatlas/hud.h @@ -18,7 +18,6 @@ class dWMHud_c : public dBase_c { static dWMHud_c *build(); static dWMHud_c *instance; - void enteredNode(dKPNode_s *node = 0); void leftNode(); @@ -32,6 +31,9 @@ class dWMHud_c : public dBase_c { bool willShowHeader; dKPNode_s *nodeForHeader; + int displayedControllerType; + void updatePressableButtonThingies(); + nw4r::lyt::Pane *N_IconPosXP_00[4]; |