Files
wagic/projects/mtg/include/DeckMenu.h
techdragon.nguyen@gmail.com 8ba33c9b58 * updated title font size for deck selection screen to ensure it will always fit
* added deck name max pixel size to ensure no deck name overflows into borders of menu.
2010-11-08 11:15:16 +00:00

63 lines
1.3 KiB
C++

/*
A class for very simple menus structure
*/
#ifndef _DeckMenu_H_
#define _DeckMenu_H_
#include <string>
#include "WFont.h"
#include "hge/hgeparticle.h"
#include "DeckMetaData.h"
#include "TextScroller.h"
class DeckMenu:public JGuiController{
protected:
float mHeight, mWidth, mX, mY;
float titleX, titleY, titleWidth;
float descX, descY, descHeight, descWidth;
float statsX, statsY, statsHeight, statsWidth;
float avatarX, avatarY;
float starsOffsetX;
bool menuInitialized;
string backgroundName;
int fontId;
string title;
string displayTitle;
WFont * mFont;
float mTitleFontScale;
int maxItems, startId;
float selectionT, selectionY;
float timeOpen;
static hgeParticleSystem* stars;
void initMenuItems();
string getDescription();
string getMetaInformation();
public:
TextScroller * scroller;
bool autoTranslate;
DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = "");
~DeckMenu();
void Render();
void Update(float dt);
void Add(int id, const char * Text, string desc = "", bool forceFocus = false, DeckMetaData *deckMetaData = NULL);
void Close();
void updateScroller();
JQuad * getBackground();
float selectionTargetY;
bool closed;
static void destroy();
};
#endif