mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 17:32:17 -07:00
[Game] Give a graphics_item_type.h to arrow_item.h
Took 23 minutes
This commit is contained in:
parent
ed4eb1cb31
commit
7ff0e3feb0
2 changed files with 11 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
#include "../../game/board/arrow_data.h"
|
#include "../../game/board/arrow_data.h"
|
||||||
#include "../animated_item.h"
|
#include "../animated_item.h"
|
||||||
#include "arrow_target.h"
|
#include "arrow_target.h"
|
||||||
|
#include "graphics_item_type.h"
|
||||||
|
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <QGraphicsItem>
|
#include <QGraphicsItem>
|
||||||
|
|
@ -48,6 +49,14 @@ protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum
|
||||||
|
{
|
||||||
|
Type = typeArrow
|
||||||
|
};
|
||||||
|
[[nodiscard]] int type() const override
|
||||||
|
{
|
||||||
|
return Type;
|
||||||
|
}
|
||||||
ArrowItem(QSharedPointer<const ArrowData> _data, ArrowTarget *_startItem, ArrowTarget *_targetItem);
|
ArrowItem(QSharedPointer<const ArrowData> _data, ArrowTarget *_startItem, ArrowTarget *_targetItem);
|
||||||
~ArrowItem() override;
|
~ArrowItem() override;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ enum GraphicsItemType
|
||||||
typeZone = QGraphicsItem::UserType + 3,
|
typeZone = QGraphicsItem::UserType + 3,
|
||||||
typePlayerTarget = QGraphicsItem::UserType + 4,
|
typePlayerTarget = QGraphicsItem::UserType + 4,
|
||||||
typeDeckViewCardContainer = QGraphicsItem::UserType + 5,
|
typeDeckViewCardContainer = QGraphicsItem::UserType + 5,
|
||||||
typeOther = QGraphicsItem::UserType + 6
|
typeOther = QGraphicsItem::UserType + 6,
|
||||||
|
typeArrow = QGraphicsItem::UserType + 7
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // COCKATRICE_GRAPHICS_ITEM_TYPE_H
|
#endif // COCKATRICE_GRAPHICS_ITEM_TYPE_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue