- fix for issue 113
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-10-24 11:52:55 +00:00
parent da6d650c3d
commit fb52ea5452
2 changed files with 22 additions and 12 deletions

View File

@@ -155,10 +155,20 @@ bool GuiGameZone::CheckUserInput(u32 key){
}
void GuiGameZone::Update(float dt){
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
(*it)->Update(dt);
if (showCards) cd->Update(dt);
PlayGuiObject::Update(dt);
for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it){
CardView * c = (*it);
c->Update(dt);
//Dirty fix for http://code.google.com/p/wagic/issues/detail?id=113
if (fabs(c->actX - c->x) < 0.01 && fabs(c->actY - c->y)< 0.01){
cards.erase(it);
trash(c);
return;
}
}
}
GuiGameZone::GuiGameZone(float x, float y, bool hasFocus, MTGGameZone* zone, GuiAvatars* parent): GuiStatic(GuiGameZone::Height, x, y, hasFocus, parent), zone(zone){