Merge remote-tracking branch 'upstream/master' into servatrice_trustedsources

This commit is contained in:
woogerboy21 2014-11-21 18:52:52 -05:00
commit 72a3f0e654
3 changed files with 16 additions and 0 deletions

View file

@ -18,3 +18,9 @@ notifications:
on_success: change on_success: change
on_failure: change on_failure: change
on_start: false on_start: false
matrix:
fast_finish: true
allow_failures:
- compiler: clang
os: linux
env: QT4=0

View file

@ -48,6 +48,11 @@ The following flags can be passed to `cmake`:
`cockatrice` is the game client `cockatrice` is the game client
`servatrice` is the server `servatrice` is the server
# Community Resources
- [reddit r/Cockatrice](http://reddit.com/r/cockatrice)
- [Woogerworks Server & Forums](http://woogerworks.com)
- [Cockatrice Official Wiki](https://github.com/Cockatrice/Cockatrice/wiki)
# License # License
Cockatrice is free software, licensed under the GPLv2; see COPYING for details. Cockatrice is free software, licensed under the GPLv2; see COPYING for details.

View file

@ -3,9 +3,11 @@
#include <QCursor> #include <QCursor>
#include <QGraphicsSceneMouseEvent> #include <QGraphicsSceneMouseEvent>
#include <QDebug> #include <QDebug>
#include <QPainter>
static const float CARD_WIDTH_HALF = CARD_WIDTH / 2; static const float CARD_WIDTH_HALF = CARD_WIDTH / 2;
static const float CARD_HEIGHT_HALF = CARD_HEIGHT / 2; static const float CARD_HEIGHT_HALF = CARD_HEIGHT / 2;
const QColor GHOST_MASK = QColor(255, 255, 255, 50);
AbstractCardDragItem::AbstractCardDragItem(AbstractCardItem *_item, const QPointF &_hotSpot, AbstractCardDragItem *parentDrag) AbstractCardDragItem::AbstractCardDragItem(AbstractCardItem *_item, const QPointF &_hotSpot, AbstractCardDragItem *parentDrag)
: QGraphicsItem(), item(_item), hotSpot(_hotSpot) : QGraphicsItem(), item(_item), hotSpot(_hotSpot)
@ -40,6 +42,9 @@ AbstractCardDragItem::~AbstractCardDragItem()
void AbstractCardDragItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void AbstractCardDragItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
item->paint(painter, option, widget); item->paint(painter, option, widget);
// adds a mask to the card so it looks like the card hasnt been placed yet
painter->fillRect(boundingRect(), GHOST_MASK);
} }
void AbstractCardDragItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) void AbstractCardDragItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)