corrected x offset of selectable area of the menu items. For Simple Menus, clicking on the row from that point to 200px is the selectable area.

This commit is contained in:
techdragon.nguyen@gmail.com
2012-01-08 16:38:52 +00:00
parent 440b3b00d9
commit e79597d82c
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -43,6 +43,7 @@ public:
void Update(float dt); void Update(float dt);
void Add(int id, const char * Text, string desc = "", bool forceFocus = false); void Add(int id, const char * Text, string desc = "", bool forceFocus = false);
int getmCurr(){return mCurr;} int getmCurr(){return mCurr;}
float getWidth(){return mWidth; }
void Close(); void Close();
void RecenterMenu(); void RecenterMenu();
+1 -1
View File
@@ -94,7 +94,7 @@ bool SimpleMenuItem::ButtonPressed()
void SimpleMenuItem::Relocate(float x, float y) void SimpleMenuItem::Relocate(float x, float y)
{ {
mXOffset = x; mXOffset = x - (parent->getWidth()/2); // determines the leftmost point of the text;
mX = x; mX = x;
mY = y; mY = y;
} }