From 33fd704a0049c894a61639cccd54ffef9fa4ba23 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 17 Jul 2016 19:03:55 +0800 Subject: [PATCH] move stats to the right in deck menu --- projects/mtg/src/SimplePopup.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/SimplePopup.cpp b/projects/mtg/src/SimplePopup.cpp index 0640dce45..680fc0e9c 100644 --- a/projects/mtg/src/SimplePopup.cpp +++ b/projects/mtg/src/SimplePopup.cpp @@ -34,12 +34,17 @@ SimplePopup::SimplePopup(int id, JGuiListener* listener, const int fontId, const void SimplePopup::Render() { mClosed = false; + float modX = (SCREEN_WIDTH_F / 2)-5; + JQuadPtr statsholder = WResourceManager::Instance()->RetrieveTempQuad("statsholder.png");//new graphics statsholder JRenderer *r = JRenderer::GetInstance(); string detailedInformation = getDetailedInformation(mDeckInformation->getFilename()); - const float textHeight = mTextFont->GetHeight() * mMaxLines; - r->FillRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 0, 0, 0 ) ); + //const float textHeight = mTextFont->GetHeight() * mMaxLines; + //r->FillRect(0,0,SCREEN_WIDTH_F,SCREEN_HEIGHT_F,ARGB(220,15,15,15)); + if(statsholder.get()) + r->RenderQuad(statsholder.get(),0,0,0,SCREEN_WIDTH_F/statsholder->mWidth,SCREEN_HEIGHT_F/statsholder->mHeight); + r->FillRoundRect(mX+modX+3, mY + 7, 190.f, 148.f, 0, ARGB( 240, 15, 15, 15 ) ); // currently causes a crash on the PSP when drawing the corners. // TODO: clean up the image ot make it loook cleaner. Find solution to load gfx to not crash PSP @@ -47,7 +52,7 @@ void SimplePopup::Render() r->DrawRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 125, 255, 0) ); drawBoundingBox( mX-3, mY, mWidth + 3, textHeight ); #endif - mTextFont->DrawString(detailedInformation.c_str(), mX + 9 , mY + 10); + mTextFont->DrawString(detailedInformation.c_str(), modX+mX + 9 , mY + 15); }