refactor(engine): deduplicate TABLEAU_FAN_FRAC constant (#59)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ use crate::card_animation::CardAnimation;
|
||||
use crate::events::{CardFaceRevealedEvent, CardFlippedEvent, StateChangedEvent};
|
||||
use crate::font_plugin::FontResource;
|
||||
use crate::game_plugin::GameMutation;
|
||||
use crate::layout::{Layout, LayoutResource, LayoutSystem};
|
||||
use crate::layout::{Layout, LayoutResource, LayoutSystem, TABLEAU_FAN_FRAC};
|
||||
use crate::pause_plugin::PausedResource;
|
||||
use crate::platform::USE_TOUCH_UI_LAYOUT;
|
||||
use crate::resources::{DragState, GameStateResource};
|
||||
@@ -40,11 +40,6 @@ use crate::ui_theme::{
|
||||
TYPE_BODY, Z_STOCK_BADGE,
|
||||
};
|
||||
|
||||
/// Fraction of card height used as vertical offset between face-up tableau cards.
|
||||
/// Must match `layout::TABLEAU_FAN_FRAC` so the initial layout and the first
|
||||
/// dynamic update from `update_tableau_fan_frac` produce identical spacing.
|
||||
pub const TABLEAU_FAN_FRAC: f32 = 0.18;
|
||||
|
||||
/// Per-card vertical step for face-down tableau cards, as a fraction of
|
||||
/// card height. Smaller than [`TABLEAU_FAN_FRAC`] because face-down cards
|
||||
/// don't need their full body shown — only the back-pattern strip is
|
||||
|
||||
Reference in New Issue
Block a user