mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 02:53:25 -08:00
[Game] Use TableZoneLogic::ROW_COUNT directly per review
This commit is contained in:
parent
c7605a51e2
commit
276cdebed4
2 changed files with 4 additions and 7 deletions
|
|
@ -62,7 +62,7 @@ TableZone::TableZone(TableZoneLogic *_logic, bool _mirrored, QGraphicsItem *pare
|
|||
|
||||
updateBg();
|
||||
|
||||
height = MARGIN_TOP + MARGIN_BOTTOM + TABLEROWS * CardDimensions::HEIGHT + (TABLEROWS - 1) * PADDING_Y;
|
||||
height = MARGIN_TOP + MARGIN_BOTTOM + TableZoneLogic::ROW_COUNT * CardDimensions::HEIGHT + (TableZoneLogic::ROW_COUNT - 1) * PADDING_Y;
|
||||
width = MIN_WIDTH;
|
||||
currentMinimumWidth = width;
|
||||
|
||||
|
|
@ -397,7 +397,7 @@ QPointF TableZone::mapFromGrid(QPoint gridPoint) const
|
|||
}
|
||||
|
||||
if (isInverted()) {
|
||||
gridPoint.setY(TABLEROWS - 1 - gridPoint.y());
|
||||
gridPoint.setY(TableZoneLogic::ROW_COUNT - 1 - gridPoint.y());
|
||||
}
|
||||
|
||||
// Start with margin plus stacked card offset
|
||||
|
|
@ -426,7 +426,7 @@ QPoint TableZone::mapToGrid(const QPointF &mapPoint) const
|
|||
gridPointY = TableZoneLogic::clampValidTableRow(gridPointY);
|
||||
|
||||
if (isInverted()) {
|
||||
gridPointY = TABLEROWS - 1 - gridPointY;
|
||||
gridPointY = TableZoneLogic::ROW_COUNT - 1 - gridPointY;
|
||||
}
|
||||
|
||||
// Calculating the x-coordinate of the grid space requires adding up the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue