summaryrefslogtreecommitdiff
path: root/src/koopatlas
diff options
context:
space:
mode:
Diffstat (limited to 'src/koopatlas')
-rw-r--r--src/koopatlas/hud.cpp18
-rw-r--r--src/koopatlas/hud.h4
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];