Improved Vertical Scrolling
This commit is contained in:
@@ -70,9 +70,9 @@ void DeckMenuItem::RenderWithOffset(float yOffset)
|
||||
JTexture * tex = resources.RetrieveTexture("new.png");
|
||||
if (tex)
|
||||
{
|
||||
JQuad * quad = resources.RetrieveQuad("new.png", 2, 2, tex->mWidth - 4, tex->mHeight - 4); //avoids weird rectangle aroudn the texture because of bilinear filtering
|
||||
quad->SetHotSpot(quad->mWidth/2, quad->mHeight/2);
|
||||
float x = mX + min(ITEM_PX_WIDTH - quad->mWidth, mFont->GetStringWidth(menuItemString.c_str()))/2 + quad->mWidth/2;
|
||||
JQuad * quad = resources.RetrieveQuad("new.png", 2, 2, tex->mWidth - 4, tex->mHeight - 4); //avoids weird rectangle aroudn the texture because of bilinear filtering
|
||||
quad->SetHotSpot(quad->mWidth/2, quad->mHeight/2);
|
||||
float x = mX + min(ITEM_PX_WIDTH - quad->mWidth, mFont->GetStringWidth(menuItemString.c_str()))/2 + quad->mWidth/2;
|
||||
if (quad) JRenderer::GetInstance()->RenderQuad(quad, x , mY + yOffset + quad->mHeight/2, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user