cosmetic bug fix issue854
adjusted the calculation of x for enstack attackers to avoid drawing cards on top of the phase wheel out outside of the red box. adjusted the red box length for uniformity. the previous calculation only drew cards to the middle of the screen and after about 15 attackers it pushed cards out of the red box, over on top of the phase wheel making it impossible to click or touch requiring alternative methods to advance to damage phase or reduction of the amount of attackers. the new calculation draws attackers at the start of the red box keeping the enstack a cardwidth and a half from the edge of the screen on both sides instead instacking massive amounts of attackers tighter inside the red box, much how we handle battlefield enstack...attacking with more then 40 creatures no longer pushes attackers off screen.
This commit is contained in:
@@ -122,7 +122,7 @@ void GuiPlay::BattleField::reset(float x, float y)
|
||||
}
|
||||
void GuiPlay::BattleField::EnstackAttacker(CardView* card)
|
||||
{
|
||||
card->x = currentAttacker * (HORZWIDTH - 20) / (attackers + 1);
|
||||
card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1));
|
||||
card->y = baseY + (card->card->getObserver()->players[0] == card->card->controller() ? 20 + y : -20 - y);
|
||||
++currentAttacker;
|
||||
// JRenderer::GetInstance()->RenderQuad(WResourceManager::Instance()->GetQuad("BattleIcon"), card->actX, card->actY, 0, 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()), 0.5 + 0.1 * sinf(JGE::GetInstance()->GetTime()));
|
||||
@@ -159,7 +159,7 @@ void GuiPlay::BattleField::Update(float dt)
|
||||
void GuiPlay::BattleField::Render()
|
||||
{
|
||||
if (height > 3)
|
||||
JRenderer::GetInstance()->FillRect(22, SCREEN_HEIGHT / 2 + 10 - height / 2, 250, height, ARGB(127, red, 0, 0));
|
||||
JRenderer::GetInstance()->FillRect(44, SCREEN_HEIGHT / 2 + 10 - height / 2, 318, height, ARGB(127, red, 0, 0));
|
||||
}
|
||||
|
||||
GuiPlay::GuiPlay(GameObserver* game) :
|
||||
|
||||
Reference in New Issue
Block a user