From 7ff0e3feb0c1b69f510dbca9ecba51097cb1dbda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 21 Aug 2026 19:12:45 +0200 Subject: [PATCH] [Game] Give a graphics_item_type.h to arrow_item.h Took 23 minutes --- cockatrice/src/game_graphics/board/arrow_item.h | 9 +++++++++ cockatrice/src/game_graphics/board/graphics_item_type.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/game_graphics/board/arrow_item.h b/cockatrice/src/game_graphics/board/arrow_item.h index 21f991b77..76a2d5d6c 100644 --- a/cockatrice/src/game_graphics/board/arrow_item.h +++ b/cockatrice/src/game_graphics/board/arrow_item.h @@ -4,6 +4,7 @@ #include "../../game/board/arrow_data.h" #include "../animated_item.h" #include "arrow_target.h" +#include "graphics_item_type.h" #include #include @@ -48,6 +49,14 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent *event) override; public: + enum + { + Type = typeArrow + }; + [[nodiscard]] int type() const override + { + return Type; + } ArrowItem(QSharedPointer _data, ArrowTarget *_startItem, ArrowTarget *_targetItem); ~ArrowItem() override; diff --git a/cockatrice/src/game_graphics/board/graphics_item_type.h b/cockatrice/src/game_graphics/board/graphics_item_type.h index 7eac132b0..afac7881f 100644 --- a/cockatrice/src/game_graphics/board/graphics_item_type.h +++ b/cockatrice/src/game_graphics/board/graphics_item_type.h @@ -16,7 +16,8 @@ enum GraphicsItemType typeZone = QGraphicsItem::UserType + 3, typePlayerTarget = QGraphicsItem::UserType + 4, typeDeckViewCardContainer = QGraphicsItem::UserType + 5, - typeOther = QGraphicsItem::UserType + 6 + typeOther = QGraphicsItem::UserType + 6, + typeArrow = QGraphicsItem::UserType + 7 }; #endif // COCKATRICE_GRAPHICS_ITEM_TYPE_H