Update some items
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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++)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user