void EquipMenu::HandleEvents(const Input &input) {
+ if (input.JustPressed(Input::SHOULDER_LEFT)) {
+ PreviousHero();
+ }
+ if (input.JustPressed(Input::SHOULDER_RIGHT)) {
+ NextHero();
+ }
if (actionMenu.IsActive()) {
if (input.JustPressed(Input::PAD_UP)) {
actionMenu.PreviousRow();
equipmentMenu.SetActive();
break;
case CHOICE_STRONGEST:
- // TODO
+ // TODO: implement "equip strongest" when items' stat effects are done
break;
case CHOICE_REMOVE:
actionMenu.SetSelected();
void EquipMenu::NextHero() {
cursor = (cursor + 1) % parent->Game().state->partySize;
LoadEquipment();
+ if (InventoryVisible()) {
+ LoadInventory();
+ }
}
void EquipMenu::PreviousHero() {
cursor = (cursor + parent->Game().state->partySize - 1) % parent->Game().state->partySize;
LoadEquipment();
+ if (InventoryVisible()) {
+ LoadInventory();
+ }
}
Hero &EquipMenu::GetHero() {