Erwan
- a few card updates - back to original font for menus
This commit is contained in:
@@ -99,8 +99,8 @@ void GameApp::Create()
|
||||
CommonRes->CreateQuad("stars", "graphics/particles.png", 64, 0, 32, 32);
|
||||
CommonRes->GetQuad("stars")->SetHotSpot(16,16);
|
||||
|
||||
CommonRes->LoadJLBFont("graphics/simon",22);
|
||||
CommonRes->GetJLBFont("graphics/simon")->SetTracking(-2);
|
||||
CommonRes->LoadJLBFont("graphics/simon",11);
|
||||
CommonRes->GetJLBFont("graphics/simon")->SetTracking(-1);
|
||||
CommonRes->LoadJLBFont("graphics/f3",16);
|
||||
CommonRes->LoadJLBFont("graphics/magic",16);
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void GameStateDuel::Start()
|
||||
|
||||
mGamePhase = DUEL_STATE_CHOOSE_DECK1;
|
||||
|
||||
mFont = GameApp::CommonRes->GetJLBFont("graphics/simon");
|
||||
mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||
mFont->SetBase(0); // using 2nd font
|
||||
opponentMenuFont = mFont; //NEW JLBFont("graphics/simon",22);
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@ void GameStateMenu::Create()
|
||||
}
|
||||
}
|
||||
|
||||
mFont = GameApp::CommonRes->GetJLBFont("graphics/simon");
|
||||
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||
//mFont->SetBase(0); // using 2nd font
|
||||
mGuiController = NEW JGuiController(100, this);
|
||||
//mGuiController->SetShadingBackground(10, 45, 80, 100, ARGB(255,0,0,0));
|
||||
@@ -345,13 +345,13 @@ void GameStateMenu::Render()
|
||||
{
|
||||
JRenderer * renderer = JRenderer::GetInstance();
|
||||
renderer->ClearScreen(ARGB(0,0,0,0));
|
||||
|
||||
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||
if ((currentState & MENU_STATE_MAJOR) == MENU_STATE_MAJOR_LOADING_CARDS){
|
||||
char text[512];
|
||||
sprintf(text, "LOADING SET: %s", mCurrentSetName);
|
||||
mFont->DrawString(text,SCREEN_WIDTH/2,SCREEN_HEIGHT/2,JGETEXT_CENTER);
|
||||
}else{
|
||||
|
||||
mFont = GameApp::CommonRes->GetJLBFont(Constants::MAIN_FONT);
|
||||
PIXEL_TYPE colors[] =
|
||||
{
|
||||
ARGB(255, 3, 2, 0),
|
||||
@@ -365,7 +365,7 @@ void GameStateMenu::Render()
|
||||
if (yW < 2*SCREEN_HEIGHT) renderer->RenderQuad(mMovingW, SCREEN_WIDTH/2 - 10, yW, angleW);
|
||||
if (mGuiController!=NULL)
|
||||
mGuiController->Render();
|
||||
|
||||
|
||||
mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
|
||||
mFont->SetColor(ARGB(128,255,255,255));
|
||||
mFont->DrawString(GAME_VERSION, SCREEN_WIDTH-10,SCREEN_HEIGHT-15,JGETEXT_RIGHT);
|
||||
@@ -396,6 +396,7 @@ void GameStateMenu::Render()
|
||||
|
||||
void GameStateMenu::ButtonPressed(int controllerId, int controlId)
|
||||
{
|
||||
JLBFont * mFont = GameApp::CommonRes->GetJLBFont(Constants::MENU_FONT);
|
||||
#if defined (WIN32) || defined (LINUX)
|
||||
char buf[4096];
|
||||
sprintf(buf, "cnotrollerId: %i", controllerId);
|
||||
@@ -410,6 +411,7 @@ void GameStateMenu::ButtonPressed(int controllerId, int controlId)
|
||||
switch (controlId)
|
||||
{
|
||||
case MENUITEM_PLAY:
|
||||
|
||||
#ifdef TESTSUITE
|
||||
subMenuController = NEW SimpleMenu(102, this, mFont, 150,60);
|
||||
#else
|
||||
|
||||
@@ -301,7 +301,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
||||
game->addObserver(NEW AZoneMover(id,card,tc,szone,cost));
|
||||
}
|
||||
}else{
|
||||
MTGGameZone * fromZone = target->getCurrentZone();
|
||||
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
|
||||
MTGGameZone * destZone = MTGGameZone::stringToZone(szone, target);
|
||||
target->controller()->game->putInZone(target,fromZone,destZone);
|
||||
}
|
||||
|
||||
@@ -337,6 +337,7 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc
|
||||
if(zoneName.compare("mygraveyard") == 0)return p->game->graveyard;
|
||||
if(zoneName.compare("opponentgraveyard") == 0) return p->opponent()->game->graveyard;
|
||||
if(zoneName.compare("ownergraveyard") == 0) return source->owner->game->graveyard;
|
||||
if(zoneName.compare("graveyard") == 0) return source->owner->game->graveyard;
|
||||
|
||||
if(zoneName.compare("myinplay") == 0)return p->game->inPlay;
|
||||
if(zoneName.compare("opponentinplay") == 0) return p->opponent()->game->inPlay;
|
||||
@@ -345,9 +346,11 @@ MTGGameZone * MTGGameZone::stringToZone(string zoneName, MTGCardInstance * sourc
|
||||
if(zoneName.compare("myhand") == 0)return p->game->hand;
|
||||
if(zoneName.compare("opponenthand") == 0) return p->opponent()->game->hand;
|
||||
if(zoneName.compare("ownerhand") == 0) return source->owner->game->hand;
|
||||
if(zoneName.compare("hand") == 0) return source->owner->game->hand;
|
||||
|
||||
if(zoneName.compare("myremovedfromgame") == 0)return p->game->removedFromGame;
|
||||
if(zoneName.compare("opponentremovedfromgame") == 0) return p->opponent()->game->removedFromGame;
|
||||
if(zoneName.compare("ownerhremovedfromgame") == 0) return source->owner->game->removedFromGame;
|
||||
if(zoneName.compare("ownerremovedfromgame") == 0) return source->owner->game->removedFromGame;
|
||||
if(zoneName.compare("removedfromgame") == 0) return source->owner->game->removedFromGame;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
const unsigned SimpleMenu::SIDE_SIZE = 7;
|
||||
const unsigned SimpleMenu::VMARGIN = 16;
|
||||
const unsigned SimpleMenu::HMARGIN = 30;
|
||||
const signed SimpleMenu::LINE_HEIGHT = 28;
|
||||
const signed SimpleMenu::LINE_HEIGHT = 20;
|
||||
const char* SimpleMenu::spadeLPath = "graphics/spade_ul.png";
|
||||
const char* SimpleMenu::spadeRPath = "graphics/spade_ur.png";
|
||||
const char* SimpleMenu::jewelPath = "graphics/jewel.png";
|
||||
|
||||
@@ -12,13 +12,13 @@ SimpleMenuItem::SimpleMenuItem(SimpleMenu* _parent, int id, JLBFont *font, const
|
||||
|
||||
if (hasFocus)
|
||||
Entering();
|
||||
// mFont->SetScale(1.2f);
|
||||
mFont->SetScale(1.2f);
|
||||
}
|
||||
|
||||
|
||||
void SimpleMenuItem::RenderWithOffset(float yOffset)
|
||||
{
|
||||
// mFont->SetScale(mScale);
|
||||
mFont->SetScale(mScale);
|
||||
//mFont->SetColor(ARGB(255,255,255,255));
|
||||
mFont->DrawString(mText.c_str(), mX, mY + yOffset, JGETEXT_CENTER);
|
||||
// mFont->SetScale(1.0f);
|
||||
@@ -31,7 +31,7 @@ void SimpleMenuItem::Render()
|
||||
|
||||
void SimpleMenuItem::Update(float dt)
|
||||
{
|
||||
/* if (mScale < mTargetScale)
|
||||
if (mScale < mTargetScale)
|
||||
{
|
||||
mScale += 8.0f*dt;
|
||||
if (mScale > mTargetScale)
|
||||
@@ -42,7 +42,7 @@ void SimpleMenuItem::Update(float dt)
|
||||
mScale -= 8.0f*dt;
|
||||
if (mScale < mTargetScale)
|
||||
mScale = mTargetScale;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user