mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-13 13:30:00 -08:00
Reserve row label space and add battlefield zone appearance state
This commit is contained in:
parent
94e6281d87
commit
62b7088807
1 changed files with 12 additions and 5 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include "../card_dimensions.h"
|
||||
#include "select_zone.h"
|
||||
|
||||
#include <QColor>
|
||||
#include <QElapsedTimer>
|
||||
#include <QMap>
|
||||
#include <QPixmap>
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue