From 025d205cbbad4a2a5e2a1c435be9c658ac67eb39 Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 24 Mar 2026 00:18:26 -0500 Subject: [PATCH 1/4] Add visual indicator to toggle untap button --- cockatrice/src/game/player/menu/card_menu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cockatrice/src/game/player/menu/card_menu.cpp b/cockatrice/src/game/player/menu/card_menu.cpp index cd77c2968..74ba8220c 100644 --- a/cockatrice/src/game/player/menu/card_menu.cpp +++ b/cockatrice/src/game/player/menu/card_menu.cpp @@ -35,6 +35,8 @@ CardMenu::CardMenu(Player *_player, const CardItem *_card, bool _shortcutsActive connect(aTap, &QAction::triggered, playerActions, &PlayerActions::cardMenuAction); aDoesntUntap = new QAction(this); aDoesntUntap->setData(cmDoesntUntap); + aDoesntUntap->setCheckable(true); + aDoesntUntap->setChecked(card != nullptr && card->getDoesntUntap()); connect(aDoesntUntap, &QAction::triggered, playerActions, &PlayerActions::cardMenuAction); aAttach = new QAction(this); connect(aAttach, &QAction::triggered, playerActions, &PlayerActions::actAttach); From b83df286f593b7d279a32001079a6d8b6a3aaf9b Mon Sep 17 00:00:00 2001 From: Scott Date: Tue, 24 Mar 2026 00:18:26 -0500 Subject: [PATCH 2/4] Rename button to match tooltip --- cockatrice/src/game/player/menu/card_menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cockatrice/src/game/player/menu/card_menu.cpp b/cockatrice/src/game/player/menu/card_menu.cpp index 74ba8220c..f2479e1da 100644 --- a/cockatrice/src/game/player/menu/card_menu.cpp +++ b/cockatrice/src/game/player/menu/card_menu.cpp @@ -451,7 +451,7 @@ void CardMenu::retranslateUi() aRevealToAll->setText(tr("&All players")); //: Turn sideways or back again aTap->setText(tr("&Tap / Untap")); - aDoesntUntap->setText(tr("Toggle &normal untapping")); + aDoesntUntap->setText(tr("Skip &untapping")); //: Turn face up/face down aFlip->setText(tr("T&urn Over")); // Only the user facing names in client got renamed to "turn over" // All code and proto bits are still unchanged (flip) for compatibility reasons From c65197410332bf562390b020d6c7452c2938fb5e Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 26 Mar 2026 20:43:31 -0500 Subject: [PATCH 3/4] Show labels for top and bottom of library when viewing cards from the deck --- .../src/game/zones/view_zone_widget.cpp | 20 +++++++++++++++++++ cockatrice/src/game/zones/view_zone_widget.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/cockatrice/src/game/zones/view_zone_widget.cpp b/cockatrice/src/game/zones/view_zone_widget.cpp index 23d7d6a19..d8af797e9 100644 --- a/cockatrice/src/game/zones/view_zone_widget.cpp +++ b/cockatrice/src/game/zones/view_zone_widget.cpp @@ -121,6 +121,13 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, extraHeight = vbox->sizeHint(Qt::PreferredSize).height(); + QGraphicsProxyWidget *cardLocationLabelProxy = new QGraphicsProxyWidget; + cardLocationLabelProxy->setWidget(&cardLocationLabel); + if (!_isReversed && showLibraryLabel(_origZone, numberCards)) { + cardLocationLabel.setText(tr("Top of Library")); + vbox->addItem(cardLocationLabelProxy); + } + QGraphicsLinearLayout *zoneHBox = new QGraphicsLinearLayout(Qt::Horizontal); zoneContainer = new QGraphicsWidget(this); @@ -138,6 +145,11 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, zoneHBox->addItem(scrollBarProxy); vbox->addItem(zoneHBox); + + if (_isReversed && showLibraryLabel(_origZone, numberCards)) { + cardLocationLabel.setText(tr("Bottom of Library")); + vbox->addItem(cardLocationLabelProxy); + } zone = new ZoneViewZone(new ZoneViewZoneLogic(player, _origZone, numberCards, _revealZone, _writeableRevealZone, _isReversed, zoneContainer), @@ -575,3 +587,11 @@ void ZoneViewWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) expandWindow(); } } + +bool ZoneViewWidget::showLibraryLabel(CardZoneLogic *zone, int numberOfCards) +{ + if (zone == nullptr || numberOfCards < 0) { + return false; + } + return zone->getName() == ZoneNames::DECK; +} diff --git a/cockatrice/src/game/zones/view_zone_widget.h b/cockatrice/src/game/zones/view_zone_widget.h index 1246192b8..988da4579 100644 --- a/cockatrice/src/game/zones/view_zone_widget.h +++ b/cockatrice/src/game/zones/view_zone_widget.h @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -62,6 +63,7 @@ private: QComboBox sortBySelector; QCheckBox shuffleCheckBox; QCheckBox pileViewCheckBox; + QLabel cardLocationLabel; bool canBeShuffled; int extraHeight; @@ -74,6 +76,7 @@ private: void stopWindowDrag(); void startWindowDrag(QGraphicsSceneMouseEvent *event); + bool showLibraryLabel(CardZoneLogic *zone, int numberOfCards); QRectF closeButtonRect(QWidget *styleWidget) const; /** * @brief Resolves the QGraphicsView to use for drag coordinate mapping From c3d6bdcbe778be0e53c3655ba3907b1c7be61aad Mon Sep 17 00:00:00 2001 From: Scott Date: Thu, 26 Mar 2026 20:48:31 -0500 Subject: [PATCH 4/4] Commit changes after format.sh --- cockatrice/src/game/zones/view_zone_widget.cpp | 2 +- cockatrice/src/game/zones/view_zone_widget.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/game/zones/view_zone_widget.cpp b/cockatrice/src/game/zones/view_zone_widget.cpp index d8af797e9..a46b0c251 100644 --- a/cockatrice/src/game/zones/view_zone_widget.cpp +++ b/cockatrice/src/game/zones/view_zone_widget.cpp @@ -145,7 +145,7 @@ ZoneViewWidget::ZoneViewWidget(Player *_player, zoneHBox->addItem(scrollBarProxy); vbox->addItem(zoneHBox); - + if (_isReversed && showLibraryLabel(_origZone, numberCards)) { cardLocationLabel.setText(tr("Bottom of Library")); vbox->addItem(cardLocationLabelProxy); diff --git a/cockatrice/src/game/zones/view_zone_widget.h b/cockatrice/src/game/zones/view_zone_widget.h index 988da4579..db1242e03 100644 --- a/cockatrice/src/game/zones/view_zone_widget.h +++ b/cockatrice/src/game/zones/view_zone_widget.h @@ -12,8 +12,8 @@ #include #include #include -#include #include +#include #include #include