diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 82dc9f005..64df9f7af 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -780,6 +780,11 @@ void GameStateMenu::Render() else sprintf(text, "%s", _("LOADING...").c_str()); } + //rectangle + renderer->FillRect(0, SCREEN_HEIGHT - 50, SCREEN_WIDTH + 1.5f, mFont->GetHeight(),ARGB(225,5,5,5)); + //renderer->FillRect(0, SCREEN_HEIGHT - 50, SCREEN_WIDTH + 1.5f, mFont->GetHeight(),ARGB(25,205,0,0)); + renderer->DrawRect(0, SCREEN_HEIGHT - 50, SCREEN_WIDTH + 1.5f, mFont->GetHeight(),ARGB(200, 204, 153, 0)); + //end mFont->SetColor(ARGB(170,0,0,0)); mFont->DrawString(text, SCREEN_WIDTH / 2 + 2, SCREEN_HEIGHT - 50 + 2, JGETEXT_CENTER); mFont->SetColor(ARGB(255,255,255,255)); diff --git a/projects/mtg/src/SimpleMenu.cpp b/projects/mtg/src/SimpleMenu.cpp index 5644a51fa..e84095aea 100644 --- a/projects/mtg/src/SimpleMenu.cpp +++ b/projects/mtg/src/SimpleMenu.cpp @@ -131,6 +131,7 @@ void SimpleMenu::Render() WFont * titleFont = WResourceManager::Instance()->GetWFont(fontId); titleFont->SetColor(ARGB(250,255,255,255));//reseting color on passes as this is a shared font now. WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); + float adjustme = 0.f; if (0 == mWidth) { float sY = mY + SimpleMenuConst::kVerticalMargin; @@ -172,18 +173,25 @@ void SimpleMenu::Render() if (timeOpen < 1) height *= timeOpen > 0 ? timeOpen : -timeOpen; float heightPadding = SimpleMenuConst::kLineHeight/2; // this to reduce the bottom padding of the menu + + if(!title.empty()) + adjustme += 7.f; + //renderer->FillRect(mX, mY, mWidth, height - heightPadding, ARGB(180,0,0,0)); - //menu black bg - renderer->FillRect(mX-3, mY-3, mWidth+6, (height - heightPadding)+6, ARGB(225,5,5,5)); - renderer->DrawRect(mX-3, mY-3, mWidth+6, (height - heightPadding)+6, ARGB(255,25,25,25)); - - //menu fill - //renderer->FillRect(mX, mY, mWidth, height - heightPadding, ARGB(225,5,5,5)); + //menu black bg fill + renderer->FillRect(mX-3, (mY+adjustme-2)-3, mWidth+6, (height - heightPadding)+6, ARGB(225,5,5,5)); + renderer->DrawRect(mX-3, (mY+adjustme-2)-3, mWidth+6, (height - heightPadding)+6, ARGB(255,25,25,25)); //menu border - renderer->DrawRect(mX-1, mY-1, mWidth+2, (height - heightPadding)+2, ARGB(255,240,240,240)); + renderer->DrawRect(mX-1, (mY+adjustme-2)-1, mWidth+2, (height - heightPadding)+2, ARGB(255,240,240,240)); //another border - renderer->DrawRect(mX+1, mY+1, mWidth-2, (height - heightPadding)-2, ARGB(255,89,89,89)); + renderer->DrawRect(mX+1, mY+1+adjustme-2, mWidth-2, (height - heightPadding)-2, ARGB(255,89,89,89)); + + if(!title.empty()) + {//title border and fill + renderer->FillRect(mX+1, mY+1+adjustme-2, mWidth-2, titleFont->GetHeight(), ARGB(25,205,0,0)); + renderer->DrawRect(mX+1, mY+1+adjustme-2, mWidth-2, titleFont->GetHeight(), ARGB(255,89,89,89)); + } renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA); /* @@ -200,12 +208,11 @@ void SimpleMenu::Render() renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE); stars->Render(); renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA); - if (!title.empty()) { float scaleFactor = titleFont->GetScale(); titleFont->SetScale(SCALE_NORMAL); - titleFont->DrawString(title.c_str(), mX + mWidth / 2, mY - 3, JGETEXT_CENTER); + titleFont->DrawString(title.c_str(), mX + mWidth / 2, mY+adjustme-1.5f, JGETEXT_CENTER); titleFont->SetScale(scaleFactor); } for (int i = startId; i < startId + maxItems; i++) diff --git a/projects/mtg/src/TextScroller.cpp b/projects/mtg/src/TextScroller.cpp index 1283f10a3..b73d4064e 100644 --- a/projects/mtg/src/TextScroller.cpp +++ b/projects/mtg/src/TextScroller.cpp @@ -67,6 +67,10 @@ void TextScroller::Update(float dt) void TextScroller::Render() { WFont * mFont = WResourceManager::Instance()->GetWFont(fontId); + JRenderer::GetInstance()->DrawLine(mX,mY,mX+mWidth,mY, ARGB(100, 255, 255, 255)); + JRenderer::GetInstance()->FillRect(mX,mY,mWidth,mFont->GetHeight(), ARGB(225,5,5,5)); + //JRenderer::GetInstance()->FillRect(mX,mY,mWidth,mFont->GetHeight(), ARGB(25,205,0,0)); + JRenderer::GetInstance()->DrawLine(mX,mY+11,mX+mWidth,mY+11, ARGB(100, 255, 255, 255)); mFont->DrawString(mText.c_str(), mX, mY, JGETEXT_LEFT, start, mWidth); }