mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 01:24:46 -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
|
|
@ -75,11 +75,11 @@ void CardDragItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
|
|||
CardZone *startZone = static_cast<CardItem *>(item)->getZone();
|
||||
if (currentZone && !(static_cast<CardItem *>(item)->getAttachedTo() && (startZone == currentZone))) {
|
||||
if (!occupied)
|
||||
currentZone->handleDropEvent(id, startZone, (sp - currentZone->scenePos()).toPoint(), faceDown);
|
||||
currentZone->handleDropEvent(this, startZone, (sp - currentZone->scenePos()).toPoint(), faceDown);
|
||||
for (int i = 0; i < childDrags.size(); i++) {
|
||||
CardDragItem *c = static_cast<CardDragItem *>(childDrags[i]);
|
||||
if (!(static_cast<CardItem *>(c->item)->getAttachedTo() && (startZone == currentZone)) && !c->occupied)
|
||||
currentZone->handleDropEvent(c->id, startZone, (sp - currentZone->scenePos() + c->getHotSpot()).toPoint(), faceDown);
|
||||
currentZone->handleDropEvent(static_cast<CardDragItem *>(c), startZone, (sp - currentZone->scenePos() + c->getHotSpot()).toPoint(), faceDown);
|
||||
sc->removeItem(c);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue