- Fixed some scaling issues with SimpleMenu

- Fixed the animation for the menu fonts when selecting an item in the menu. mTargetScale and mScale in SimpleButton are here for a reason, people! 
-- Note: I'm not sure I actually like the "zoom on currently selected item" thing, not sure it brings much.
-- we should definitely consider a hi resolution font because now it really doesn't look good, when it is scaled that much

Why is the subtypes menu using a different font from all other simpleMenus ?
This commit is contained in:
wagic.the.homebrew
2012-03-21 14:44:23 +00:00
parent 3ba22cd615
commit a581d1bba3
3 changed files with 43 additions and 20 deletions

View File

@@ -134,8 +134,8 @@ void SimpleMenu::Render()
for (int i = 0; i < mCount; ++i)
{
float width = (static_cast<SimpleMenuItem*> (mObjects[i]))->GetWidth() + 15;
if (mWidth < width) mWidth = width * float(1.5);
float width = (static_cast<SimpleMenuItem*> (mObjects[i]))->GetEnlargedWidth() + 15;
if (mWidth < width) mWidth = width;
}
if ((!title.empty()) && (mWidth < titleFont->GetStringWidth(title.c_str())))
mWidth = titleFont->GetStringWidth(title.c_str());