SImple Menu
This commit is contained in:
@@ -172,14 +172,26 @@ 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
|
||||
renderer->FillRect(mX, mY, mWidth, height - heightPadding, ARGB(180,0,0,0));
|
||||
//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 border
|
||||
renderer->DrawRect(mX-1, mY-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->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
/*
|
||||
drawVertPole(mX, mY, height - heightPadding);
|
||||
drawVertPole(mX + mWidth, mY, height - heightPadding);
|
||||
drawHorzPole(mX, mY, mWidth);
|
||||
drawHorzPole(mX, mY + height - heightPadding, mWidth);
|
||||
drawHorzPole(mX, mY + height - heightPadding, mWidth);*///horizontal and vertical disabled
|
||||
|
||||
//drawVertPole(mX, mY - 16, height + 32);
|
||||
//drawVertPole(mX + mWidth, mY - 16, height + 32);
|
||||
//drawHorzPole(mX - 16, mY, mWidth + 32);
|
||||
|
||||
@@ -253,8 +253,14 @@ void WGuiMenu::subBack(WGuiBase * item)
|
||||
if (split->right) subBack(split->right);//renderer->FillRoundRect(split->right->getX()-2,split->getY()-2,split->right->getWidth(),split->getHeight(),2,split->right->getColor(WGuiColor::BACK));
|
||||
}
|
||||
else
|
||||
renderer->FillRoundRect(item->getX(), item->getY(), item->getWidth() - 4, item->getHeight() - 2, 2, item->getColor(
|
||||
{
|
||||
renderer->FillRoundRect(item->getX(), item->getY(), item->getWidth() - 4, item->getHeight() - 2, 1, item->getColor(
|
||||
WGuiColor::BACK));
|
||||
//inner border
|
||||
renderer->DrawRoundRect(item->getX(), item->getY(), item->getWidth() - 4, item->getHeight() - 2, 1, ARGB(255,89,89,89));
|
||||
//outer border
|
||||
//renderer->DrawRect(item->getX()-1.5f, item->getY()-1, item->getWidth()+1, item->getHeight() +2, ARGB(80,240,240,240));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -408,7 +414,7 @@ void WGuiList::Render()
|
||||
float barLength = static_cast<float> ((SCREEN_HEIGHT - y) / listSelectable);
|
||||
if (barLength < 4) barLength = 4;
|
||||
renderer->FillRect(x + width - 2, y - 1, 2, SCREEN_HEIGHT - y, getColor(WGuiColor::SCROLLBAR));
|
||||
renderer->FillRoundRect(x + width - 5, barPosition, 5, barLength, 2, getColor(WGuiColor::SCROLLBUTTON));
|
||||
renderer->FillRoundRect(x + width - 5, barPosition, 5, barLength, 1, getColor(WGuiColor::SCROLLBUTTON));
|
||||
}
|
||||
|
||||
//Render current overlay.
|
||||
@@ -1190,7 +1196,11 @@ void WGuiTabMenu::Render()
|
||||
{
|
||||
float w = mFont->GetStringWidth(_((*it)->getDisplay()).c_str());
|
||||
mFont->SetColor((*it)->getColor(WGuiColor::TEXT_TAB));
|
||||
renderer->FillRoundRect(offset + 5, 5, w + 5, 25, 2, (*it)->getColor(WGuiColor::BACK_TAB));
|
||||
renderer->FillRoundRect(offset + 6.5f, 5, w + 6.5f, 25, 0, (*it)->getColor(WGuiColor::BACK_TAB));
|
||||
//inside border
|
||||
renderer->DrawRoundRect(offset + 6.5f, 5, w + 6.5f, 25, 0, ARGB(180,89,89,89));
|
||||
//outside border
|
||||
//renderer->DrawRoundRect(offset + 5.5f, 4, w + 8.5f, 27, 0, ARGB(180,240,240,240));
|
||||
mFont->DrawString(_((*it)->getDisplay()).c_str(), offset + 10, 10);
|
||||
offset += w + 10 + 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user