X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FMenu.cpp;h=6a3c6fed0d21ac88e12516db2465ef8eb93136de;hb=8a32dc9e4e1011b10f009e999d7d008aa2711d8a;hp=f3d9e0bf70a3a55ee5d657d67c6550cfb0c8b972;hpb=5509b55dbc13227bdc7b97f2934fa71dad02cc66;p=lugaru.git
diff --git a/Source/Menu.cpp b/Source/Menu.cpp
index f3d9e0b..6a3c6fe 100644
--- a/Source/Menu.cpp
+++ b/Source/Menu.cpp
@@ -20,55 +20,64 @@ along with Lugaru. If not, see .
#include
#include
+#include
#include "gamegl.h"
#include "Menu.h"
-using namespace Menu;
+#include "Settings.h"
+#include "Input.h"
+#include "Campaign.h"
-extern float multiplier;
+// Should not be needed, Menu should call methods from other classes to launch maps and challenges and so on
+#include "Awards.h"
+#include "openal_wrapper.h"
-struct MenuItem {
- enum MenuItemType {NONE, LABEL, BUTTON, IMAGE, IMAGEBUTTON, MAPMARKER, MAPLINE, MAPLABEL} type;
- int id;
- string text;
- Texture texture;
- int x, y, w, h;
- float r, g, b;
- float effectfade;
-
- float linestartsize;
- float lineendsize;
-
- void init(MenuItemType _type, int _id, const string& _text, Texture _texture,
- int _x, int _y, int _w, int _h, float _r, float _g, float _b,
- float _linestartsize = 1, float _lineendsize = 1) {
- type = _type;
- id = _id;
- text = _text;
- texture = _texture;
- x = _x;
- y = _y;
- w = _w;
- h = _h;
- r = _r;
- g = _g;
- b = _b;
- effectfade = 0;
- linestartsize = _linestartsize;
- lineendsize = _lineendsize;
- if (type == MenuItem::BUTTON) {
- if (w == -1)
- w = text.length() * 10;
- if (h == -1)
- h = 20;
- }
- }
-};
+using namespace Game;
-vector