Files
wagic/projects/mtg/include/SimplePopup.h
techdragon.nguyen@gmail.com a36d886dd5 Added first draft of an interactive button. Needs to handle addition of images a little better
refined detailed info window for stats display
removed PSP button for Touch interfaces (currently only iOS and Android) on deck selection screens
to not break the core engine and reduce some more complex code, I created a new vector in the JController object. mButtons.  This vector will contain all the valid buttons for a given screen.  The appropriate Add/Remove methods have been updated to account for this new vector.
2012-01-25 18:35:24 +00:00

59 lines
1.4 KiB
C++

/*
* SimplePopup.h
* Created on: Nov 18, 2010
*
* Simple popup dialog box for displaying information only.
*/
#ifndef SIMPLEPOPUP_H_
#define SIMPLEPOPUP_H_
#pragma once
#include <JGui.h>
#include <JTypes.h>
#include <WFont.h>
#include <DeckMetaData.h>
class SimplePopup: public JGuiController
{
private:
float mWidth, mX, mY;
int mMaxLines;
int mFontId;
DeckMetaData * mDeckInformation;
string mTitle;
WFont *mTextFont;
StatsWrapper *mStatsWrapper;
bool mClosed;
MTGAllCards * mCollection;
void drawHorzPole(string imageName, bool flipX, bool flipY, float x, float y, float width);
void drawCorner(string imageName, bool flipX, bool flipY, float x, float y);
void drawVertPole(string imageName, bool flipX, bool flipY, float x, float y, float height);
public:
bool autoTranslate;
SimplePopup(int id, JGuiListener* listener, const int fontId, const char * _title = "", DeckMetaData* deckInfo = NULL, MTGAllCards * collection = NULL, int x = 364, int y = 235);
~SimplePopup(void);
void drawBoundingBox(float x, float y, float width, float height);
bool isClosed()
{
return mClosed;
}
MTGAllCards* getCollection()
{
return mCollection;
}
void Render();
void Update(DeckMetaData* deckMetaData);
string getDetailedInformation(string deckFilename);
void Update(float dt);
void Close();
};
#endif /* SIMPLEPOPUP_H_ */