mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-09 15:54:47 -07:00
card menu improvement, change controller support (bug #3)
This commit is contained in:
parent
4f9252c65c
commit
231887367c
25 changed files with 305 additions and 205 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "zoneviewzone.h"
|
||||
#include "player.h"
|
||||
#include "protocol_items.h"
|
||||
#include "carddragitem.h"
|
||||
|
||||
ZoneViewZone::ZoneViewZone(Player *_p, CardZone *_origZone, int _numberCards, QGraphicsItem *parent)
|
||||
: SelectZone(_p, _origZone->getName(), false, false, true, parent, true), bRect(QRectF()), minRows(0), numberCards(_numberCards), origZone(_origZone), sortByName(false), sortByType(false)
|
||||
|
|
@ -122,9 +123,9 @@ void ZoneViewZone::addCardImpl(CardItem *card, int x, int /*y*/)
|
|||
card->update();
|
||||
}
|
||||
|
||||
void ZoneViewZone::handleDropEvent(int cardId, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
|
||||
void ZoneViewZone::handleDropEvent(CardDragItem *dragItem, CardZone *startZone, const QPoint &/*dropPoint*/, bool /*faceDown*/)
|
||||
{
|
||||
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 ZoneViewZone::removeCard(int position)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue