fix phaseinfo/fakebar graphics

it should look nice now.. :)
This commit is contained in:
Anthony Calosa
2017-01-26 18:33:04 +08:00
parent 1428eeba06
commit e239dc039b

View File

@@ -151,12 +151,10 @@ void GuiPhaseBar::Render()
sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str());
#if !defined (PSP)
if(phaseinfo.get())
{
phaseinfo->mWidth = font->GetStringWidth(buf)+12.f;
phaseinfo->SetHotSpot(phaseinfo->mWidth -4, 0);
//phaseinfo->mHeight = font->GetHeight()+5.f;
JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),SCREEN_WIDTH_F,0,0,2.2f, SCREEN_HEIGHT_F / phaseinfo->mHeight);
{//fix phaseinfo graphics... should look nice now...
float testW = ((font->GetStringWidth(buf))*2) - SCREEN_WIDTH_F;
phaseinfo->SetHotSpot(testW+40.f, 0);
JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),0,0,0,SCREEN_WIDTH_F / phaseinfo->mWidth, SCREEN_HEIGHT_F / phaseinfo->mHeight);
}
#endif
font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT);