feat(engine): add InputPlugin with keyboard and stock-click

Keyboard: U=undo, N=new game, D=draw, Escape=pause placeholder (logged
only until the pause screen lands). Mouse: left-click on the stock pile
fires DrawRequestEvent. Cursor coordinates are converted via the active
Camera2d's viewport_to_world_2d so the hit-test works under arbitrary
camera setups.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-23 16:26:40 -07:00
parent 0a87f0f8f2
commit 900de7f376
3 changed files with 127 additions and 1 deletions
+2 -1
View File
@@ -1,5 +1,5 @@
use bevy::prelude::*;
use solitaire_engine::{CardPlugin, GamePlugin, TablePlugin};
use solitaire_engine::{CardPlugin, GamePlugin, InputPlugin, TablePlugin};
fn main() {
App::new()
@@ -16,5 +16,6 @@ fn main() {
.add_plugins(GamePlugin)
.add_plugins(TablePlugin)
.add_plugins(CardPlugin)
.add_plugins(InputPlugin)
.run();
}