]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/PartyMenu.cpp
made vector components writable
[l2e.git] / src / menu / PartyMenu.cpp
index 993fad5abc00f0293175ffc635213461da0b79a6..99e86d1b67e40521ee86f616aa6bf0051db1849e 100644 (file)
@@ -8,6 +8,8 @@
 #include "PartyMenu.h"
 
 #include "ChangeHero.h"
+#include "ConfigMenu.h"
+#include "EquipMenu.h"
 #include "InventoryMenu.h"
 #include "Resources.h"
 #include "SelectHero.h"
@@ -104,6 +106,7 @@ void PartyMenu::HandleEvents(const Input &input) {
                        case MENU_ITEM_CAPSULE:
                                break;
                        case MENU_ITEM_EQUIP:
+                               Ctrl().PushState(new SelectHero(this, this, this, OnEquipSelect));
                                break;
                        case MENU_ITEM_STATUS:
                                Ctrl().PushState(new SelectHero(this, this, this, OnStatusSelect));
@@ -112,6 +115,7 @@ void PartyMenu::HandleEvents(const Input &input) {
                                Ctrl().PushState(new ChangeHero(this));
                                break;
                        case MENU_ITEM_CONFIG:
+                               Ctrl().PushState(new ConfigMenu(this));
                                break;
                        case MENU_ITEM_SCENARIO:
                                break;
@@ -202,10 +206,10 @@ const Resources &PartyMenu::Res() const {
        return *game->menuResources;
 }
 
-void PartyMenu::OnStatusSelect(void *ref, int index) {
+void PartyMenu::OnEquipSelect(void *ref, int index) {
        PartyMenu *self(reinterpret_cast<PartyMenu *>(ref));
        self->Ctrl().ChangeState(
-                       new StatusMenu(self, index));
+                       new EquipMenu(self, index));
 }
 
 void PartyMenu::OnSpellSelect(void *ref, int index) {
@@ -214,4 +218,10 @@ void PartyMenu::OnSpellSelect(void *ref, int index) {
                        new SpellMenu(self, index));
 }
 
+void PartyMenu::OnStatusSelect(void *ref, int index) {
+       PartyMenu *self(reinterpret_cast<PartyMenu *>(ref));
+       self->Ctrl().ChangeState(
+                       new StatusMenu(self, index));
+}
+
 }