- tap/untap of a card now sends an event
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-25 14:23:21 +00:00
parent 3d414f74b3
commit 630a239f31
14 changed files with 97 additions and 60 deletions
+9 -12
View File
@@ -199,19 +199,16 @@ void MTGGuiPlay::forceUpdateCards(){
}
int MTGGuiPlay::receiveEvent(WEvent *event){
if (event->type == WEvent::CHANGE_ZONE){
WEventZoneChange * e = dynamic_cast<WEventZoneChange*>(event);
if (!event) return 0;
int ok = 0;
for (int i = 0; i < 2 ; i++){
Player * p = game->players[i];
if (e->from == p->game->inPlay || e->to == p->game->inPlay ) ok = 1;
}
if (!ok) return 0;
forceUpdateCards();
return 1;
WEventZoneChange * e = dynamic_cast<WEventZoneChange*>(event);
if (!e) return 0;
int ok = 0;
for (int i = 0; i < 2 ; i++){
Player * p = game->players[i];
if (e->from == p->game->inPlay || e->to == p->game->inPlay ) ok = 1;
}
return 0;
if (!ok) return 0;
forceUpdateCards();
return 1;
}
void MTGGuiPlay::updateCards(){