feat(engine): add layout, LayoutResource, and TablePlugin
compute_layout is a pure function that maps window size to card size and the 13 pile positions, with clamping at the 800x600 minimum and seven tableau columns horizontally aligned with stock/waste (cols 0,1) and the four foundations (cols 3,4,5,6). TablePlugin spawns a 2D camera, a felt background sprite, and 13 translucent pile-marker sprites, and repositions them on WindowResized. Plugin registers WindowResized explicitly so it works under MinimalPlugins in tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -6,11 +6,15 @@
|
||||
|
||||
pub mod events;
|
||||
pub mod game_plugin;
|
||||
pub mod layout;
|
||||
pub mod resources;
|
||||
pub mod table_plugin;
|
||||
|
||||
pub use events::{
|
||||
CardFlippedEvent, DrawRequestEvent, GameWonEvent, MoveRequestEvent, NewGameRequestEvent,
|
||||
StateChangedEvent, UndoRequestEvent,
|
||||
};
|
||||
pub use game_plugin::GamePlugin;
|
||||
pub use layout::{compute_layout, Layout, LayoutResource};
|
||||
pub use resources::{DragState, GameStateResource, SyncStatus, SyncStatusResource};
|
||||
pub use table_plugin::{PileMarker, TableBackground, TablePlugin};
|
||||
|
||||
Reference in New Issue
Block a user