border highlighter
This commit is contained in:
@@ -260,6 +260,47 @@ void CardGui::Render()
|
||||
fakeborder->SetColor(ARGB((int)(actA),15,15,15));
|
||||
renderer->RenderQuad(fakeborder.get(), actX, actY, actT, (29 * actZ + 1) / 16, 42 * actZ / 16);
|
||||
}
|
||||
//draw border for highlighting
|
||||
if (card && card->isTargetted())
|
||||
{
|
||||
if(card->isTapped())
|
||||
{
|
||||
//focus?
|
||||
CardView* cv = dynamic_cast<CardView*>(card->view);
|
||||
if(cv->mHasFocus)
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(95,255,0,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(95,255,0,0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(95,255,0,0));
|
||||
}
|
||||
}
|
||||
if (card && card->isTargetter())
|
||||
{
|
||||
if(card->isTapped())
|
||||
{
|
||||
//focus?
|
||||
CardView* cv = dynamic_cast<CardView*>(card->view);
|
||||
if(cv->mHasFocus)
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(95,0,245,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(95,0,245,0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->FillRoundRect(actX - (scale * quad->mWidth / 2)-2,actY - (scale * quad->mHeight / 2)-2, (scale * quad->mWidth)-0.02f, (scale * quad->mHeight)-0.02f, 1.8f,ARGB(95,0,245,0));
|
||||
}
|
||||
}
|
||||
//draw the card image
|
||||
renderer->RenderQuad(quad.get(), actX, actY, actT, scale, scale);
|
||||
}
|
||||
@@ -301,7 +342,7 @@ void CardGui::Render()
|
||||
}
|
||||
}
|
||||
|
||||
//draw border?line
|
||||
//draw line
|
||||
if (card && card->isTargetted())
|
||||
{
|
||||
if(card->isTapped())
|
||||
@@ -309,9 +350,13 @@ void CardGui::Render()
|
||||
//focus?
|
||||
CardView* cv = dynamic_cast<CardView*>(card->view);
|
||||
if(cv->mHasFocus)
|
||||
{
|
||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,255,0,0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -320,14 +365,18 @@ void CardGui::Render()
|
||||
}
|
||||
if (card && card->isTargetter())
|
||||
{
|
||||
if(card->isTapped())
|
||||
if(card->isTapped())
|
||||
{
|
||||
//focus?
|
||||
CardView* cv = dynamic_cast<CardView*>(card->view);
|
||||
if(cv->mHasFocus)
|
||||
{
|
||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-10,actY - (scale * quad->mHeight / 2)+6.5f, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer->DrawRoundRect(actX - (scale * quad->mWidth / 2)-8,actY - (scale * quad->mHeight / 2)+4, (scale * quad->mHeight)-0.02f, (scale * quad->mWidth)-0.02f, 1.8f,ARGB(250,0,255,0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user