card menu improvement, change controller support (bug #3)

This commit is contained in:
Max-Wilhelm Bruker 2010-12-23 19:21:47 +01:00
parent 4f9252c65c
commit 231887367c
25 changed files with 305 additions and 205 deletions

View file

@ -5,6 +5,7 @@
#include "settingscache.h"
#include "player.h"
#include "protocol_items.h"
#include "carddragitem.h"
StackZone::StackZone(Player *_p, int _zoneHeight, QGraphicsItem *parent)
: SelectZone(_p, "stack", false, false, true, parent), zoneHeight(_zoneHeight)
@ -51,11 +52,11 @@ void StackZone::paint(QPainter *painter, const QStyleOptionGraphicsItem */*optio
painter->fillRect(boundingRect(), QBrush(bgPixmap));
}
void StackZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
void StackZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
{
if (startZone == this)
return;
player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), cardId, getName(), 0, 0, false));
player->sendGameCommand(new Command_MoveCard(-1, startZone->getName(), dragItem->getId(), player->getId(), getName(), 0, 0, false));
}
void StackZone::reorganizeCards()