Border Corrections

Removed other border render, and use the one in cardgui::drawcard...
This commit is contained in:
Anthony Calosa
2016-07-29 23:10:01 +08:00
parent 5350fb7f5d
commit a56e77310d
5 changed files with 54 additions and 82 deletions

View File

@@ -341,28 +341,9 @@ void CardSelector::Render()
{
if(timer > 0)
{
float modx = 0.f;
//if(card->mHasFocus && observer->isInHand(card->getCard()) && !card->getCard()->owner->isAI())
//modx -= 1.8f;//todo small adjustment
//new npos for smaller bigquad
Pos npos = Pos(bigpos.x+7.f+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/10),bigpos.t,bigpos.alpha);
//border
if(mDrawMode < 2)
{
string cardsetname = setlist[card->getCard()->setId].c_str();
if(cardsetname == "2ED"||cardsetname == "RV"||cardsetname == "4ED"||cardsetname == "5ED"||cardsetname == "6ED"||cardsetname == "7ED"||cardsetname == "8ED"||cardsetname == "9ED"||cardsetname == "CHR"||cardsetname == "DM")
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,248,248,255));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(150,20,20,20));
}
else
{
JRenderer::GetInstance()->FillRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(255,5,5,5));
JRenderer::GetInstance()->DrawRoundRect((npos.actX - (npos.actZ * 84.f))-11.5f,(npos.actY - (npos.actZ * 119.7f))-14.f,npos.actZ * 168.f + 6.5f,npos.actZ * 239.4f + 12.f,8.f,ARGB(50,240,240,240));
}
}
Pos npos = Pos(bigpos.x+7.f,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/10),bigpos.t,bigpos.alpha);
//render card
card->DrawCard(npos, mDrawMode, false, true);
card->DrawCard(npos, mDrawMode);
}
}
}