seperated backdrop and phase info graphic
This commit is contained in:
@@ -228,9 +228,9 @@ void GameApp::Create()
|
|||||||
LOG("--Loading various textures");
|
LOG("--Loading various textures");
|
||||||
// Load in this function only textures that are used frequently throughout the game. These textures will constantly stay in Ram, so be frugal
|
// Load in this function only textures that are used frequently throughout the game. These textures will constantly stay in Ram, so be frugal
|
||||||
WResourceManager::Instance()->RetrieveTexture("phasebar.png", RETRIEVE_MANAGE);
|
WResourceManager::Instance()->RetrieveTexture("phasebar.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("backdrop.jpg", RETRIEVE_MANAGE);
|
WResourceManager::Instance()->RetrieveTexture("backdrop.jpg", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("handback.png", RETRIEVE_MANAGE);
|
WResourceManager::Instance()->RetrieveTexture("handback.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("shadows.png", RETRIEVE_MANAGE);
|
WResourceManager::Instance()->RetrieveTexture("shadows.png", RETRIEVE_MANAGE);
|
||||||
|
|||||||
@@ -30,8 +30,6 @@ void GuiBackground::Render()
|
|||||||
}
|
}
|
||||||
if (quad.get())
|
if (quad.get())
|
||||||
{
|
{
|
||||||
quad->mWidth = 480.f;
|
renderer->RenderQuad(quad.get(), 0, 0, 0, SCREEN_WIDTH_F / quad->mWidth, SCREEN_HEIGHT_F / quad->mHeight);
|
||||||
quad->mHeight = 272.f;
|
|
||||||
renderer->RenderQuad(quad.get(), 0, 0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ bool GuiPhaseBar::Leaving(JButton)
|
|||||||
void GuiPhaseBar::Render()
|
void GuiPhaseBar::Render()
|
||||||
{
|
{
|
||||||
JQuadPtr quad = WResourceManager::Instance()->GetQuad("phasebar");
|
JQuadPtr quad = WResourceManager::Instance()->GetQuad("phasebar");
|
||||||
|
JQuadPtr phaseinfo = WResourceManager::Instance()->RetrieveTempQuad("phaseinfo.png"); //new phaseinfo graphics
|
||||||
//uncomment to draw a hideous line across hires screens.
|
//uncomment to draw a hideous line across hires screens.
|
||||||
// JRenderer::GetInstance()->DrawLine(0, CENTER, SCREEN_WIDTH, CENTER, ARGB(255, 255, 255, 255));
|
// JRenderer::GetInstance()->DrawLine(0, CENTER, SCREEN_WIDTH, CENTER, ARGB(255, 255, 255, 255));
|
||||||
|
|
||||||
@@ -148,6 +149,13 @@ void GuiPhaseBar::Render()
|
|||||||
string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1);
|
string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1);
|
||||||
phaseNameToTranslate = _(phaseNameToTranslate);
|
phaseNameToTranslate = _(phaseNameToTranslate);
|
||||||
sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str());
|
sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str());
|
||||||
|
if(phaseinfo.get())
|
||||||
|
{
|
||||||
|
phaseinfo->SetHotSpot(phaseinfo->mWidth - 1.f,0);
|
||||||
|
phaseinfo->mWidth = font->GetStringWidth(buf)+12.f;
|
||||||
|
phaseinfo->mHeight = font->GetHeight()+5.f;
|
||||||
|
JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),SCREEN_WIDTH_F,0,0);
|
||||||
|
}
|
||||||
font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT);
|
font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user