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:
@@ -18,34 +18,44 @@ private:
|
||||
SimpleMenu* parent;
|
||||
float mScale;
|
||||
float mTargetScale;
|
||||
|
||||
protected:
|
||||
int fontId;
|
||||
string mText;
|
||||
bool mHasFocus;
|
||||
bool mIsValidSelection;
|
||||
float mX;
|
||||
float mY;
|
||||
|
||||
protected:
|
||||
int mFontId;
|
||||
string mText;
|
||||
static float mYOffset;
|
||||
float mXOffset;
|
||||
|
||||
bool mIsValidSelection;
|
||||
virtual void checkUserClick();
|
||||
|
||||
string mDescription;
|
||||
|
||||
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;
|
||||
float mY;
|
||||
virtual int getFontId() const;
|
||||
virtual void setFontId( const int& fontId );
|
||||
virtual void setX( const float& x ) { mX = x; };
|
||||
virtual void setY( const float& y ) { mY = y; };
|
||||
|
||||
virtual void setIsSelectionValid( bool validSelection );
|
||||
virtual void setFocus(bool value);
|
||||
virtual void setDescription( const string& desc );
|
||||
virtual void setText( const string& text);
|
||||
|
||||
virtual bool isSelectionValid() const;
|
||||
virtual bool hasFocus() const;
|
||||
virtual string getDescription() const;
|
||||
virtual string getText() const;
|
||||
float getX() const;
|
||||
float getY() const;
|
||||
virtual void checkUserClick();
|
||||
|
||||
|
||||
virtual float GetWidth() const;
|
||||
virtual void Relocate(float x, float y);
|
||||
virtual float GetWidth();
|
||||
|
||||
virtual bool hasFocus();
|
||||
|
||||
void RenderWithOffset(float yOffset);
|
||||
virtual void RenderWithOffset(float yOffset);
|
||||
virtual void Render();
|
||||
virtual void Update(float dt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user