ok made minor changes to mikes last commit, instead of loading "nothing" im making it load a card back instead, that black hole drove me nuts....second instead of loading a premade "evil twin" i made it load what ever the users avatar was flipped horizontally. didn't tint it red becuase i am not that attuned to the graphics side of wagic.
This commit is contained in:
@@ -243,9 +243,26 @@ void DeckMenu::Render()
|
||||
// display the avatar image
|
||||
if (currentMenuItem->imageFilename.size() > 0)
|
||||
{
|
||||
JQuadPtr quad = WResourceManager::Instance()->RetrieveTempQuad(currentMenuItem->imageFilename, TEXTURE_SUB_AVATAR);
|
||||
if (quad.get())
|
||||
renderer->RenderQuad(quad.get(), avatarX, avatarY);
|
||||
JQuadPtr quad;
|
||||
if(currentMenuItem->imageFilename == "EvilTwinAvatar")
|
||||
{
|
||||
quad = WResourceManager::Instance()->RetrieveTempQuad("avatar.jpg", TEXTURE_SUB_AVATAR);
|
||||
if(quad.get())
|
||||
{
|
||||
JQuad * evil = quad.get();
|
||||
evil->SetHFlip(true);
|
||||
evil->SetColor(red);
|
||||
renderer->RenderQuad(quad.get(), avatarX, avatarY);
|
||||
evil = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
quad = WResourceManager::Instance()->RetrieveTempQuad(currentMenuItem->imageFilename, TEXTURE_SUB_AVATAR);
|
||||
if (quad.get())
|
||||
renderer->RenderQuad(quad.get(), avatarX, avatarY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// fill in the description part of the screen
|
||||
|
||||
@@ -47,15 +47,18 @@ DeckMenuItem::DeckMenuItem(DeckMenu* _parent, int id, int fontId, string text, f
|
||||
switch(id)
|
||||
{
|
||||
case kRandomPlayerMenuID:
|
||||
this->imageFilename = "avatar.jpg";
|
||||
this->imageFilename = "noavatar.jpg";
|
||||
break;
|
||||
case kRandomAIPlayerMenuID:
|
||||
this->imageFilename = "avatar.jpg";
|
||||
this->imageFilename = "noavatar.jpg";
|
||||
break;
|
||||
case kEvilTwinMenuID:
|
||||
this->imageFilename = "avatar_evil_twin.jpg";
|
||||
break;
|
||||
{
|
||||
this->imageFilename = "EvilTwinAvatar";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
this->imageFilename = "noavatar.jpg";
|
||||
// do nothing.
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user