Fix Segmentation Fault & Formatting
This commit is contained in:
@@ -21,18 +21,18 @@ private:
|
||||
string mText;
|
||||
float mX;
|
||||
float mY;
|
||||
float mTitleResetWidth;
|
||||
float mTitleResetWidth;
|
||||
string mDescription;
|
||||
static float mYOffset;
|
||||
float mScrollerOffset;
|
||||
DeckMetaData *mMetaData;
|
||||
string mImageFilename;
|
||||
string mImageFilename;
|
||||
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(DeckMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus = false, bool autoTranslate = false, DeckMetaData *meta = NULL);
|
||||
~DeckMenuItem();
|
||||
|
||||
virtual void Relocate(float x, float y);
|
||||
@@ -44,39 +44,39 @@ public:
|
||||
virtual bool ButtonPressed();
|
||||
virtual ostream& toString(ostream& out) const;
|
||||
|
||||
virtual bool getTopLeft(float& top, float& left)
|
||||
virtual bool getTopLeft(float& top, float& left)
|
||||
{
|
||||
top = mY + mYOffset;
|
||||
left = mX;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Accessors
|
||||
|
||||
string getImageFilename() const { return mImageFilename; };
|
||||
float getY() const { return mY; };
|
||||
float getX() const { return mX; };
|
||||
string getDescription() const { return mDescription; };
|
||||
string getText() const { return mText; };
|
||||
bool hasFocus() const { return mHasFocus; };
|
||||
bool hasMetaData() const { return mMetaData == NULL ? false : true;};
|
||||
// Accessors
|
||||
|
||||
string getImageFilename() const { return mImageFilename; };
|
||||
float getY() const { return mY; };
|
||||
float getX() const { return mX; };
|
||||
string getDescription() const { return mDescription; };
|
||||
string getText() const { return mText; };
|
||||
bool hasFocus() const { return mHasFocus; };
|
||||
bool hasMetaData() const { return mMetaData == NULL ? false : true;};
|
||||
|
||||
float getWidth() const;
|
||||
string getDeckName() const;
|
||||
float getWidth() const;
|
||||
string getDeckName() const;
|
||||
|
||||
string getDeckStatsSummary() const
|
||||
{
|
||||
if (mMetaData)
|
||||
return mMetaData->getStatsSummary();
|
||||
return "";
|
||||
}
|
||||
string getDeckStatsSummary() const
|
||||
{
|
||||
if (mMetaData)
|
||||
return mMetaData->getStatsSummary();
|
||||
return "";
|
||||
}
|
||||
|
||||
DeckMetaData *getMetaData() const
|
||||
{
|
||||
return mMetaData;
|
||||
}
|
||||
DeckMetaData *getMetaData() const
|
||||
{
|
||||
return mMetaData;
|
||||
}
|
||||
|
||||
// Setters
|
||||
// Setters
|
||||
void setDescription( const string& description ) { mDescription = description; }
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user