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.
This commit is contained in:
@@ -4,22 +4,48 @@
|
||||
#ifndef _SIMPLEMENU_H_
|
||||
#define _SIMPLEMENU_H_
|
||||
|
||||
#include <string>
|
||||
#include <JGui.h>
|
||||
#include <JLBFont.h>
|
||||
#include <string>
|
||||
#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, int width, const char * _title = NULL, int _maxItems = 10);
|
||||
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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user