made DeckMenuItem a subclass of SimpleMenuItem

moved code to check on click position into base class from DeckMenuItem
TODO: apply same logic for standard menus
This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-08 14:55:22 +00:00
parent 5ff2ac3123
commit 1cef5d690b
4 changed files with 49 additions and 41 deletions

View File

@@ -14,16 +14,25 @@ using std::string;
class SimpleMenuItem: public JGuiObject
{
private:
bool mHasFocus;
SimpleMenu* parent;
int fontId;
string mText;
float mScale;
float mTargetScale;
protected:
int fontId;
string mText;
bool mHasFocus;
static float mYOffset;
float mXOffset;
bool mIsValidSelection;
void checkUserClick();
public:
string desc;
SimpleMenuItem(int id);
SimpleMenuItem(SimpleMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false);
float mX;