From 62b7088807ea31a9a9ea3860d2eac0160f7d5a46 Mon Sep 17 00:00:00 2001 From: Christian Daniel Jensen Date: Sun, 1 Nov 2026 23:52:42 -0700 Subject: [PATCH] Reserve row label space and add battlefield zone appearance state --- cockatrice/src/game_graphics/zones/table_zone.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cockatrice/src/game_graphics/zones/table_zone.h b/cockatrice/src/game_graphics/zones/table_zone.h index 8aa4936ad..992e150df 100644 --- a/cockatrice/src/game_graphics/zones/table_zone.h +++ b/cockatrice/src/game_graphics/zones/table_zone.h @@ -11,6 +11,7 @@ #include "../card_dimensions.h" #include "select_zone.h" +#include #include #include #include @@ -47,10 +48,10 @@ private: */ static const int MARGIN_LEFT = 20; static const int MARGIN_RIGHT = 15; - static const int MARGIN_TOP = 10; - static const int MARGIN_BOTTOM = 30; + static const int MARGIN_TOP = 30; // Space for zone labels. + static const int MARGIN_BOTTOM = 26; static const int PADDING_X = 35; - static const int PADDING_Y = 30; + static const int PADDING_Y = 50; /* Minimum width of the table zone including margins. @@ -61,7 +62,7 @@ private: Offset sizes when cards are stacked on each other in the grid */ static const int STACKED_CARD_OFFSET_X = CardDimensions::WIDTH / 3; - static const int STACKED_CARD_OFFSET_Y = PADDING_Y / 3; + static const int STACKED_CARD_OFFSET_Y = 8; // Avoid covering the next zone label. /* Width of the box line drawn in the margin around the active player's area @@ -100,6 +101,11 @@ private: bool mirrored = false; bool playmatActive = false; + QColor frontZoneColor; + QColor supportZoneColor; + QColor commandZoneColor; + QString zoneLabelFontFamily; + [[nodiscard]] bool isInverted() const; private slots: @@ -220,7 +226,8 @@ private: qreal damageShimmerAlpha = 0.0; void paintZoneOutline(QPainter *painter); - void paintLandDivider(QPainter *painter); + void paintBattlefieldRows(QPainter *painter); + void reloadBattlefieldAppearance(); /* Calculates card stack widths so mapping functions work properly