From 6d44d060c49e53a52074a6d27527c360df008b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vasco=20Guerreiro=20Vint=C3=A9m=20Morais?= Date: Tue, 2 Jun 2026 17:09:39 +0100 Subject: [PATCH] Implement in-game navigation with keyboard Implements a start to the keyboard navigation with the direction arrows and the space key for card selection. Some binds are still needed, but navigating the board is now possible. The feature includes tests for the implemented feature. Closes #5043 Co-authored-by: Manuel Ramos Monge --- cockatrice/src/game_graphics/board/arrow_item.h | 7 +++++++ cockatrice/src/game_graphics/board/card_item.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cockatrice/src/game_graphics/board/arrow_item.h b/cockatrice/src/game_graphics/board/arrow_item.h index 1c306e065..51f6b6b6f 100644 --- a/cockatrice/src/game_graphics/board/arrow_item.h +++ b/cockatrice/src/game_graphics/board/arrow_item.h @@ -68,6 +68,13 @@ public: { targetLocked = _targetLocked; } + + void delArrow(); + static void sendCreateArrowCommand(PlayerLogic *player, + CardItem *startCard, + ArrowTarget *targetItem, + const QColor &color, + int deleteInPhase = 0); }; class ArrowDragItem : public ArrowItem diff --git a/cockatrice/src/game_graphics/board/card_item.cpp b/cockatrice/src/game_graphics/board/card_item.cpp index a7308ccff..4cb0b6fd5 100644 --- a/cockatrice/src/game_graphics/board/card_item.cpp +++ b/cockatrice/src/game_graphics/board/card_item.cpp @@ -11,9 +11,9 @@ #include "../phase.h" #include "../player/player_actions.h" #include "../player/player_logic.h" -#include "../zones/view_zone_logic.h" #include "../zones/table_zone.h" #include "../zones/view_zone.h" +#include "../zones/view_zone_logic.h" #include "arrow_item.h" #include "card_drag_item.h"