diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 8ef23402d..9c1ace170 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -117,7 +117,7 @@ void GameStateMenu::Create() { currentState = MENU_STATE_MAJOR_LANG | MENU_STATE_MINOR_NONE; } - scroller = NEW TextScroller(Fonts::MAIN_FONT, SCREEN_WIDTH / 2 + 50, 5, 180); + scroller = NEW TextScroller(Fonts::MAIN_FONT, SCREEN_WIDTH / 2 + 65, 5, 180); scrollerSet = 0; splashTex = NULL; diff --git a/projects/mtg/src/TextScroller.cpp b/projects/mtg/src/TextScroller.cpp index 2ff9a47f2..99c11f1b5 100644 --- a/projects/mtg/src/TextScroller.cpp +++ b/projects/mtg/src/TextScroller.cpp @@ -66,8 +66,19 @@ void TextScroller::Update(float dt) void TextScroller::Render() { + JQuadPtr fakebar = WResourceManager::Instance()->RetrieveTempQuad("phaseinfo.png"); //new phaseinfo graphics WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); mFont->SetColor(ARGB(128,255,255,255)); + if(fakebar.get()) + { + if(mText.length() > 1) + { + float xscale = (mFont->GetStringWidth(mText.c_str())+(mFont->GetStringWidth(mText.c_str())/18)) / fakebar->mWidth; + float yscale = (mFont->GetHeight()+(mFont->GetHeight()/3.5f)) / fakebar->mHeight; + fakebar->SetHotSpot(fakebar->mWidth-8.f,0); + JRenderer::GetInstance()->RenderQuad(fakebar.get(),SCREEN_WIDTH_F, 4,0,xscale,yscale); + } + } mFont->DrawString(mText.c_str(), mX, mY, JGETEXT_LEFT, start, mWidth); }