From 37fd0ebbd28ec4dd1bc278bd8684efb2a3f74fa7 Mon Sep 17 00:00:00 2001 From: zethfoxster Date: Mon, 18 Jul 2016 19:02:03 -0400 Subject: [PATCH] readded the "fakebar" size adjustments based on string lengths. in debug there is a strange line drawn sometimes on screen, like the buttons on main screen, this is not present in release builds, I'm guessing its some kind of debug related thing with JGE and quads. --- projects/mtg/src/GuiPhaseBar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/GuiPhaseBar.cpp b/projects/mtg/src/GuiPhaseBar.cpp index 9f879ecbb..c96fc78ab 100644 --- a/projects/mtg/src/GuiPhaseBar.cpp +++ b/projects/mtg/src/GuiPhaseBar.cpp @@ -151,10 +151,11 @@ void GuiPhaseBar::Render() sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str()); if(phaseinfo.get()) { - phaseinfo->SetHotSpot(phaseinfo->mWidth-2.f,0); - //phaseinfo->mWidth = font->GetStringWidth(buf)+12.f; + + 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,SCREEN_WIDTH_F / phaseinfo->mWidth, SCREEN_HEIGHT_F / phaseinfo->mHeight); + JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),SCREEN_WIDTH_F,0,0,2.2f, SCREEN_HEIGHT_F / phaseinfo->mHeight); } font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT); }