mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
47 lines
896 B
C++
47 lines
896 B
C++
/**
|
|
* @file arrow_target.h
|
|
* @ingroup GameGraphics
|
|
* @brief TODO: Document this.
|
|
*/
|
|
|
|
#ifndef ARROWTARGET_H
|
|
#define ARROWTARGET_H
|
|
|
|
#include "../../game_graphics/board/abstract_graphics_item.h"
|
|
|
|
#include <QList>
|
|
|
|
class PlayerLogic;
|
|
class ArrowItem;
|
|
|
|
class ArrowTarget : public AbstractGraphicsItem
|
|
{
|
|
Q_OBJECT
|
|
protected:
|
|
PlayerLogic *owner;
|
|
|
|
private:
|
|
bool beingPointedAt = false;
|
|
|
|
signals:
|
|
void scenePositionChanged();
|
|
|
|
public:
|
|
explicit ArrowTarget(PlayerLogic *_owner, QGraphicsItem *parent = nullptr);
|
|
~ArrowTarget() override = default;
|
|
|
|
[[nodiscard]] PlayerLogic *getOwner() const
|
|
{
|
|
return owner;
|
|
}
|
|
|
|
void setBeingPointedAt(bool _beingPointedAt);
|
|
[[nodiscard]] bool getBeingPointedAt() const
|
|
{
|
|
return beingPointedAt;
|
|
}
|
|
|
|
protected:
|
|
QVariant itemChange(GraphicsItemChange change, const QVariant &value) override;
|
|
};
|
|
#endif
|