Files
wagic/projects/mtg/include/SimpleMenu.h
jean.chalard a82d4b51bb J :
* New menu style - step one.
  More improvements are to come, but this should be stable and have a good
  portion of what is to be done.
2008-12-30 05:24:38 +00:00

53 lines
1.2 KiB
C++

/*
A class for very simple menus structure
*/
#ifndef _SIMPLEMENU_H_
#define _SIMPLEMENU_H_
#include <string>
#include <JGui.h>
#include <JLBFont.h>
#include "hge/hgeparticle.h"
class SimpleMenu:public JGuiController{
private:
// See SimpleMenu.cpp for values
static const unsigned SIDE_SIZE;
static const unsigned VMARGIN;
static const unsigned HMARGIN;
static const unsigned LINE_HEIGHT;
static const char* spadeLPath;
static const char* spadeRPath;
static const char* jewelPath;
static const char* sidePath;
static const char* titleFontPath;
private:
int mHeight, mWidth, mX, mY;
JLBFont* mFont;
std::string title;
int displaytitle;
int maxItems,startId;
hgeParticleSystem* stars;
float selectionT, selectionY;
float timeOpen;
static JQuad *spadeR, *spadeL, *jewel, *side;
static JLBFont* titleFont;
void drawHorzPole(int x, int y, int width);
void drawVertPole(int x, int y, int height);
public:
SimpleMenu(int id, JGuiListener* listener, JLBFont* font, int x, int y, const char * _title = "", int _maxItems = 10);
void Render();
void Update(float dt);
void Add(int id, const char * Text);
void Close();
float selectionTargetY;
bool closed;
};
#endif