refactored DeckMenuItem to be a derived class of SimpleMenuItem. Not sure why I had made them distinct.

TODO: review DeckMenu and SimpleMenu to see if it would be better to have them derive from a base class rather than be distinct.
This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-23 08:39:18 +00:00
parent 2b7cf505db
commit 519cd3bd69
7 changed files with 148 additions and 86 deletions

View File

@@ -22,13 +22,13 @@ protected:
virtual void checkUserClick();
public:
DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL);
~DeckMenuItem();
string imageFilename;
string desc;
float mScrollerOffset;
DeckMetaData *meta;
virtual bool hasFocus();
virtual void Relocate(float x, float y);
virtual float GetWidth();
virtual void Render();
@@ -38,18 +38,7 @@ public:
{
return SimpleMenuItem::getTopLeft(top, left);
}
string GetText()
{
return mText;
}
string GetDescription()
{
return desc;
}
DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL);
~DeckMenuItem();
virtual void Entering();
virtual bool Leaving(JButton key);
virtual bool ButtonPressed();