refactored menu classes
fixed some layout issues with detailed info popup changed requirements for detailed info popup button to be determined by the number of wins aginst AI deck instead of just the number of games.
This commit is contained in:
@@ -29,7 +29,6 @@ protected:
|
||||
string title;
|
||||
string displayTitle;
|
||||
WFont * mFont;
|
||||
float menuFontScale;
|
||||
float titleFontScale;
|
||||
|
||||
int maxItems, startId;
|
||||
@@ -42,26 +41,30 @@ protected:
|
||||
void initMenuItems();
|
||||
string getDescription();
|
||||
string getMetaInformation();
|
||||
DeckMetaData *selectedDeck;
|
||||
DeckMetaData *mSelectedDeck;
|
||||
int mSelectedDeckId;
|
||||
bool mShowDetailsScreen;
|
||||
bool mAlwaysShowDetailsButton;
|
||||
bool mClosed;
|
||||
|
||||
public:
|
||||
TextScroller * scroller;
|
||||
bool autoTranslate;
|
||||
TextScroller * mScroller;
|
||||
bool mAutoTranslate;
|
||||
float mSelectionTargetY;
|
||||
|
||||
//used for detailed info button
|
||||
JQuad * pspIcons[8];
|
||||
JTexture * pspIconsTexture;
|
||||
DeckMetaData * getSelectedDeck();
|
||||
bool selectedDeckHasDetails();
|
||||
int selectedDeckId;
|
||||
bool showDetailsScreen;
|
||||
bool enableDetails;
|
||||
float selectionTargetY;
|
||||
bool closed;
|
||||
|
||||
DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = "", const int& startIndex = 0, const float& mFontScale = 1.0f);
|
||||
|
||||
DeckMenu(int id, JGuiListener* listener, int fontId, const string _title = "", const int& startIndex = 0, bool alwaysShowDetailsButton = false);
|
||||
~DeckMenu();
|
||||
|
||||
DeckMetaData * getSelectedDeck();
|
||||
bool showDetailsScreen();
|
||||
bool isClosed() { return mClosed; }
|
||||
int getSelectedDeckId() { return mSelectedDeckId; }
|
||||
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
void Add(int id, const char * Text, string desc = "", bool forceFocus = false, DeckMetaData *deckMetaData = NULL);
|
||||
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
int percentVictories();
|
||||
DeckStat * getDeckStat(string opponentsFile);
|
||||
int nbGames();
|
||||
int nbVictories();
|
||||
};
|
||||
|
||||
class StatsWrapper
|
||||
|
||||
@@ -18,6 +18,7 @@ class SimpleMenu:public JGuiController{
|
||||
int maxItems,startId;
|
||||
float selectionT, selectionY;
|
||||
float timeOpen;
|
||||
bool mClosed;
|
||||
|
||||
static JQuad *spadeR, *spadeL, *jewel, *side;
|
||||
static JTexture *spadeRTex, *spadeLTex, *jewelTex, *sideTex;
|
||||
@@ -37,7 +38,7 @@ class SimpleMenu:public JGuiController{
|
||||
void Close();
|
||||
|
||||
float selectionTargetY;
|
||||
bool closed;
|
||||
bool isClosed() { return mClosed; }
|
||||
static void destroy();
|
||||
};
|
||||
|
||||
|
||||
@@ -24,18 +24,22 @@ private:
|
||||
DeckMetaData * mDeckInformation;
|
||||
string mTitle;
|
||||
WFont *mTextFont;
|
||||
StatsWrapper *stw;
|
||||
StatsWrapper *mStatsWrapper;
|
||||
bool mClosed;
|
||||
MTGAllCards * mCollection;
|
||||
|
||||
void drawHorzPole(float x, float y, float width);
|
||||
void drawVertPole(float x, float y, float height);
|
||||
|
||||
public:
|
||||
MTGAllCards * mCollection;
|
||||
bool autoTranslate;
|
||||
bool closed;
|
||||
|
||||
|
||||
SimplePopup(int id, JGuiListener* listener, const int fontId, const char * _title = "", DeckMetaData* deckInfo = NULL, MTGAllCards * collection = NULL);
|
||||
~SimplePopup(void);
|
||||
|
||||
bool isClosed() { return mClosed; }
|
||||
MTGAllCards* getCollection() { return mCollection; }
|
||||
void Render();
|
||||
void Update(DeckMetaData* deckMetaData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user