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"
|
|
|
|
|
|
|
|
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-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();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|