mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
show hand context menu when hand counter is rightclicked
This commit is contained in:
parent
683c57bb88
commit
3211801e39
5 changed files with 26 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include <QPainter>
|
||||
#include <QSvgRenderer>
|
||||
#include <QPixmapCache>
|
||||
#include <QGraphicsSceneMouseEvent>
|
||||
#include "handcounter.h"
|
||||
#include "cardzone.h"
|
||||
|
||||
|
|
@ -48,3 +49,11 @@ void HandCounter::paint(QPainter *painter, const QStyleOptionGraphicsItem * /*op
|
|||
|
||||
paintNumberEllipse(number, 24, Qt::white, -1, -1, painter);
|
||||
}
|
||||
|
||||
void HandCounter::mousePressEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (event->button() == Qt::RightButton) {
|
||||
emit showContextMenu(event->screenPos());
|
||||
event->accept();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue