mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-06 05:23:56 -07:00
move stuff around and docs
This commit is contained in:
parent
7b2cfbd86f
commit
5a5ca0fe1c
2 changed files with 14 additions and 10 deletions
|
|
@ -419,6 +419,15 @@ void GameScene::requestArrowDeletion(int arrowId)
|
|||
}
|
||||
}
|
||||
|
||||
void GameScene::requestClearArrowsForPlayer(int playerId)
|
||||
{
|
||||
for (auto *arrow : arrowRegistry.values()) {
|
||||
if (arrow->getPlayer()->getPlayerInfo()->getId() == playerId) {
|
||||
emit requestArrowDeletion(arrow->getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GameScene::onCardZoneChanged(CardItem *card, bool sameZone)
|
||||
{
|
||||
QList<ArrowItem *> toDelete;
|
||||
|
|
@ -436,15 +445,6 @@ void GameScene::onCardZoneChanged(CardItem *card, bool sameZone)
|
|||
}
|
||||
}
|
||||
|
||||
void GameScene::requestClearArrowsForPlayer(int playerId)
|
||||
{
|
||||
for (auto *arrow : arrowRegistry.values()) {
|
||||
if (arrow->getPlayer()->getPlayerInfo()->getId() == playerId) {
|
||||
emit requestArrowDeletion(arrow->getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ---------- Hover Handling ----------
|
||||
|
||||
void GameScene::updateHover(const QPointF &scenePos)
|
||||
|
|
|
|||
|
|
@ -201,12 +201,16 @@ public slots:
|
|||
QTransform getViewTransform() const;
|
||||
QTransform getViewportTransform() const;
|
||||
|
||||
/// Directly modifies the scene
|
||||
void addArrow(const ArrowData &data);
|
||||
void deleteArrow(int arrowId);
|
||||
|
||||
/// Queues up arrow deletion but doesn't directly modify the scene
|
||||
void requestArrowDeletion(int arrowId);
|
||||
void onCardZoneChanged(CardItem *card, bool sameZone);
|
||||
void requestClearArrowsForPlayer(int playerId);
|
||||
|
||||
void onCardZoneChanged(CardItem *card, bool sameZone);
|
||||
|
||||
protected:
|
||||
/** @brief Handles hover updates. */
|
||||
bool event(QEvent *event) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue