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:
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user