make rendering of retrieval and rendering of background more tightly bounded.

This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-08 13:41:32 +00:00
parent 7fe03d52fd
commit 1e988ef6bb
2 changed files with 6 additions and 5 deletions

View File

@@ -96,12 +96,14 @@ fontId(fontId) {
}
JQuad* DeckMenu::getBackground()
void DeckMenu::RenderBackground()
{
ostringstream bgFilename;
bgFilename << backgroundName << ".png";
JQuad *background = resources.RetrieveTempQuad(bgFilename.str(), TEXTURE_SUB_5551);
return background;
if ( background )
JRenderer::GetInstance()->RenderQuad( background, 0, 0 );
}
void DeckMenu::initMenuItems()
@@ -171,8 +173,7 @@ void DeckMenu::Render()
currentMenuItem->RenderWithOffset(-kLineHeight*startId);
}
JQuad * background = getBackground();
renderer->RenderQuad( background, 0, 0 );
RenderBackground();
if (!title.empty())
{