2008-03-08 23:03:26 +01:00
|
|
|
#ifndef __MENUMENU_H
|
|
|
|
#define __MENUMENU_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "../punkt2d.h"
|
|
|
|
#include "menuitem.h"
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
namespace segl {
|
|
|
|
|
2008-03-08 23:03:26 +01:00
|
|
|
class MenuMenu {
|
|
|
|
private:
|
|
|
|
std::vector<MenuItem*> menuitems;
|
|
|
|
|
|
|
|
int itempos;
|
|
|
|
Punkt2D menupos;
|
|
|
|
bool centermenu;
|
|
|
|
bool centerScreenX;
|
2008-03-23 18:00:55 +01:00
|
|
|
bool dohighlight;
|
|
|
|
bool paintbackground;
|
2008-03-08 23:03:26 +01:00
|
|
|
int basefontsize;
|
|
|
|
int offset;
|
|
|
|
int maxwidth;
|
|
|
|
int valuewidth;
|
2008-03-23 18:00:55 +01:00
|
|
|
GLFontEngine fontengine;
|
2008-07-31 00:51:39 +02:00
|
|
|
|
|
|
|
// Soll anderes center evtl. ersetzen
|
|
|
|
// TODO: cleanup
|
|
|
|
bool fullcenter;
|
2008-03-08 23:03:26 +01:00
|
|
|
public:
|
|
|
|
MenuMenu();
|
|
|
|
|
|
|
|
void setPos(const Punkt2D&);
|
|
|
|
void setCenter(bool);
|
|
|
|
void setCenterScreenX(bool);
|
|
|
|
void setBaseFontSize(int);
|
|
|
|
void setMaxWidth(int);
|
2008-03-23 18:00:55 +01:00
|
|
|
void setPaintBackground(bool);
|
2008-03-08 23:03:26 +01:00
|
|
|
|
|
|
|
void up();
|
|
|
|
void down();
|
|
|
|
void left();
|
|
|
|
void right();
|
|
|
|
void select();
|
2008-03-23 18:00:55 +01:00
|
|
|
void charInput(char c);
|
|
|
|
|
|
|
|
void resetItemPos();
|
2008-03-08 23:03:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
void addMenuItem(MenuItem*);
|
|
|
|
void render();
|
|
|
|
};
|
|
|
|
|
2008-08-10 17:14:54 +02:00
|
|
|
} // namespace segl
|
|
|
|
|
2008-03-08 23:03:26 +01:00
|
|
|
#endif
|