Activated mouse tracking in option and award menus. Activated offset support in SimpleMenu, it should help for issue 674

This commit is contained in:
Xawotihs
2011-06-04 16:22:45 +00:00
parent 715d498bce
commit 4bf255596f
5 changed files with 17 additions and 9 deletions

View File

@@ -4,6 +4,8 @@
#include "Translate.h"
#include "WResourceManager.h"
float SimpleMenuItem::mYOffset = 0;
SimpleMenuItem::SimpleMenuItem(SimpleMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus, bool autoTranslate) :
JGuiObject(id), parent(_parent), fontId(fontId), mX(x), mY(y)
{
@@ -21,8 +23,9 @@ SimpleMenuItem::SimpleMenuItem(SimpleMenu* _parent, int id, int fontId, string t
void SimpleMenuItem::RenderWithOffset(float yOffset)
{
WFont * mFont = WResourceManager::Instance()->GetWFont(fontId);
mFont->DrawString(mText.c_str(), mX, mY + yOffset, JGETEXT_CENTER);
mYOffset = yOffset;
WFont * mFont = WResourceManager::Instance()->GetWFont(fontId);
mFont->DrawString(mText.c_str(), mX, mY + yOffset, JGETEXT_CENTER);
}
void SimpleMenuItem::Render()