feat(engine): Phase F touch action bar — thumb-reach Undo/Draw/Hint + hold-to-repeat undo
Touch layout (USE_TOUCH_UI_LAYOUT) restructures the bottom action bar to five buttons: an enlarged Undo / Draw / Hint trio (96x64px targets, 1.35x labels) between compact Menu and Pause. Draw is new — it fires the same DrawRequestEvent as tapping the stock, so the most frequent action no longer needs a reach to the top of a tall folded screen. Help, Modes, and New Game leave the touch bar (they live in Menu -> System, the Home grid, and Home's hero respectively). Desktop keeps the seven-button bar unchanged (decision 5: touch-only). Holding Undo now steps back repeatedly after a 0.45s delay (5.5/s), each step through the normal request path so the scoring penalty applies. New self-ambiguous DrawRequestWriters set keeps the ambiguity gate at zero with the fourth DrawRequestEvent writer. 6 new hud_plugin tests; workspace suite + clippy green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -136,11 +136,22 @@ impl Plugin for InputPlugin {
|
||||
.add_systems(
|
||||
Update,
|
||||
(
|
||||
handle_keyboard_core,
|
||||
// The three `DrawRequestEvent` writers join the
|
||||
// self-ambiguous `DrawRequestWriters` set so the HUD's
|
||||
// touch Draw button (hud_plugin, Phase F) can write the
|
||||
// same queue without tripping the ambiguity gate. The
|
||||
// `.chain()` still orders them relative to each other.
|
||||
handle_keyboard_core
|
||||
.in_set(crate::game_plugin::DrawRequestWriters)
|
||||
.ambiguous_with(crate::game_plugin::DrawRequestWriters),
|
||||
handle_keyboard_hint,
|
||||
handle_keyboard_forfeit,
|
||||
handle_stock_click,
|
||||
handle_touch_stock_tap,
|
||||
handle_stock_click
|
||||
.in_set(crate::game_plugin::DrawRequestWriters)
|
||||
.ambiguous_with(crate::game_plugin::DrawRequestWriters),
|
||||
handle_touch_stock_tap
|
||||
.in_set(crate::game_plugin::DrawRequestWriters)
|
||||
.ambiguous_with(crate::game_plugin::DrawRequestWriters),
|
||||
handle_double_click,
|
||||
// Mouse drag pipeline.
|
||||
start_drag,
|
||||
|
||||
Reference in New Issue
Block a user