* 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.
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-08 11:15:16 +00:00
parent eec0c5b717
commit 8ba33c9b58
6 changed files with 81 additions and 49 deletions

View File

@@ -24,12 +24,16 @@ class DeckMenu:public JGuiController{
string backgroundName;
int fontId;
std::string title;
string title;
string displayTitle;
WFont * mFont;
float mTitleFontScale;
int maxItems, startId;
float selectionT, selectionY;
float timeOpen;
WFont* titleFont;
static hgeParticleSystem* stars;
void initMenuItems();
@@ -39,7 +43,6 @@ class DeckMenu:public JGuiController{
public:
TextScroller * scroller;
bool autoTranslate;
JQuad * getBackground();
DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = "");
~DeckMenu();
@@ -48,6 +51,7 @@ class DeckMenu:public JGuiController{
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;

View File

@@ -27,7 +27,7 @@ class DeckMenuItem: public JGuiObject
string desc;
DeckMetaData *meta;
DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL);
DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL, const float &scaleFactor = 1.0f);
~DeckMenuItem();
float mX;
float mY;