mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 11:03:54 -07:00
refactor: extract CARD_HEIGHT to shared CardDimensions header (#6668)
* refactor: extract CARD_HEIGHT to shared CardDimensions header Move duplicated CARD_WIDTH/CARD_HEIGHT constants to card_dimensions.h. Fixed documentation in z_value_layer_manager.h. * WIDTH_F used directly instead of casting * Improved consistency and added missing newlines at end of files
This commit is contained in:
parent
14f1925edc
commit
bd5cbb89d4
18 changed files with 108 additions and 78 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef Z_VALUES_H
|
||||
#define Z_VALUES_H
|
||||
|
||||
#include "card_dimensions.h"
|
||||
#include "z_value_layer_manager.h"
|
||||
|
||||
/**
|
||||
|
|
@ -70,8 +71,7 @@ constexpr qreal TOP_UI = ZValueLayerManager::overlayZValue(7.0);
|
|||
*/
|
||||
[[nodiscard]] constexpr qreal tableCardZValue(qreal x, qreal y)
|
||||
{
|
||||
constexpr qreal CARD_HEIGHT_FOR_Z = 102.0;
|
||||
return (y + CARD_HEIGHT_FOR_Z) * 100000.0 + (x + 1) * 100.0;
|
||||
return (y + CardDimensions::HEIGHT_F) * 100000.0 + (x + 1) * 100.0;
|
||||
}
|
||||
|
||||
// Card layering (general architecture, not command-zone specific)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue