First set of Graphic changes

TODO: generate a graph/stats on deck menu to the right, update other
graphics, move detailed info on the right of deck menu...
This commit is contained in:
Anthony Calosa
2016-07-16 09:15:58 +08:00
parent 0d7600d62c
commit c617ede243
5 changed files with 67 additions and 26 deletions

View File

@@ -112,10 +112,10 @@ void DeckMenuItem::RenderWithOffset(float yOffset)
JTexture * tex = WResourceManager::Instance()->RetrieveTexture("new.png");
if (tex)
{
JQuadPtr quad = WResourceManager::Instance()->RetrieveQuad("new.png", 2.0f, 2.0f, tex->mWidth - 4.0f, tex->mHeight - 4.0f); //avoids weird rectangle aroudn the texture because of bilinear filtering
JQuadPtr quad = WResourceManager::Instance()->RetrieveQuad("new.png", 2.0f, 2.0f, tex->mWidth - 0.0f, tex->mHeight - 0.0f); //avoids weird rectangle aroudn the texture because of bilinear filtering
quad->SetHotSpot(quad->mWidth/2.0f, quad->mHeight/2.0f);
float x = mX + min(ITEM_PX_WIDTH - quad->mWidth, getWidth() )/2 + quad->mWidth/2;
if (quad) JRenderer::GetInstance()->RenderQuad(quad.get(), x , mY + yOffset + quad->mHeight/2, 0.5);
if (quad) JRenderer::GetInstance()->RenderQuad(quad.get(), x , mY + yOffset + quad->mHeight/2, 0, 16.f / quad->mWidth, 12.f / quad->mHeight);
}
}
mFont->SetScale(SCALE_NORMAL);