]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/PartyMenu.cpp
switched geometric scalars from floating to fixed
[l2e.git] / src / menu / PartyMenu.cpp
index 99e86d1b67e40521ee86f616aa6bf0051db1849e..46e271bd70218fc95f8d889d6b74f703f9021b2d 100644 (file)
@@ -1,17 +1,12 @@
-/*
- * PartyMenu.cpp
- *
- *  Created on: Oct 21, 2012
- *      Author: holy
- */
-
 #include "PartyMenu.h"
 
+#include "CapsuleMenu.h"
 #include "ChangeHero.h"
 #include "ConfigMenu.h"
 #include "EquipMenu.h"
 #include "InventoryMenu.h"
 #include "Resources.h"
+#include "ScenarioMenu.h"
 #include "SelectHero.h"
 #include "SpellMenu.h"
 #include "StatusMenu.h"
 #include "../app/Input.h"
 #include "../common/GameConfig.h"
 #include "../common/GameState.h"
-#include "../geometry/Vector.h"
+#include "../math/Vector.h"
 #include "../graphics/Font.h"
 #include "../graphics/Frame.h"
 #include "../graphics/Texture.h"
 
 using app::Input;
 using common::GameConfig;
-using geometry::Vector;
+using math::Vector;
 
 namespace menu {
 
@@ -46,7 +41,7 @@ PartyMenu::PartyMenu(GameConfig *game)
        mainMenu.Add(Res().mainMenuStatusText, 4);
        mainMenu.Add(Res().mainMenuSpellText, 1);
        mainMenu.Add(Res().mainMenuChangeText, 5);
-       mainMenu.Add(Res().mainMenuCapsuleText, 2);
+       mainMenu.Add(Res().mainMenuCapsuleText, 2, game->state->capsule);
        mainMenu.Add(Res().mainMenuConfigText, 6);
        mainMenu.Add(Res().mainMenuEquipmentText, 3);
        mainMenu.Add(Res().mainMenuScenarioText, 7);
@@ -104,6 +99,11 @@ void PartyMenu::HandleEvents(const Input &input) {
                                Ctrl().PushState(new SelectHero(this, this, this, OnSpellSelect));
                                break;
                        case MENU_ITEM_CAPSULE:
+                               if (game->state->capsule) {
+                                       Ctrl().PushState(new CapsuleMenu(this));
+                               } else {
+                                       // noise and blur
+                               }
                                break;
                        case MENU_ITEM_EQUIP:
                                Ctrl().PushState(new SelectHero(this, this, this, OnEquipSelect));
@@ -118,6 +118,7 @@ void PartyMenu::HandleEvents(const Input &input) {
                                Ctrl().PushState(new ConfigMenu(this));
                                break;
                        case MENU_ITEM_SCENARIO:
+                               Ctrl().PushState(new ScenarioMenu(this));
                                break;
                        default:
                                break;
@@ -125,7 +126,7 @@ void PartyMenu::HandleEvents(const Input &input) {
        }
 }
 
-void PartyMenu::UpdateWorld(float deltaT) {
+void PartyMenu::UpdateWorld(Uint32 deltaT) {
 
 }