From 6beb9f68ac394478612a555299520bd8576945ec Mon Sep 17 00:00:00 2001 From: funman300 Date: Tue, 12 May 2026 17:49:40 -0700 Subject: [PATCH] fix(engine): help panel scrollable via touch on Android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Register touch_scroll_panel:: so the Controls overlay can be scrolled by swipe on Android. Without it, the Mode Launcher and Overlays sections (rows 2–19) were unreachable via touch. Also add 96px bottom padding to HelpScrollable — same fix applied to settings_plugin — so the last row clears the scroll-container edge. Register TouchInput message so existing headless tests continue to pass. Co-Authored-By: Claude Sonnet 4.6 --- solitaire_engine/src/help_plugin.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/solitaire_engine/src/help_plugin.rs b/solitaire_engine/src/help_plugin.rs index 9f491f6..a392332 100644 --- a/solitaire_engine/src/help_plugin.rs +++ b/solitaire_engine/src/help_plugin.rs @@ -44,13 +44,19 @@ pub struct HelpPlugin; impl Plugin for HelpPlugin { fn build(&self, app: &mut App) { app.add_message::() - // `MouseWheel` is emitted by Bevy's input plugin under - // `DefaultPlugins`; register it explicitly so the help-scroll - // system also runs cleanly under `MinimalPlugins` in tests. + // `MouseWheel` and `TouchInput` are emitted by Bevy's input + // plugin under `DefaultPlugins`; register them explicitly so + // scroll systems run cleanly under `MinimalPlugins` in tests. .add_message::() + .add_message::() .add_systems( Update, - (toggle_help_screen, handle_help_close_button, scroll_help_panel), + ( + toggle_help_screen, + handle_help_close_button, + scroll_help_panel, + crate::ui_modal::touch_scroll_panel::, + ), ); } } @@ -229,6 +235,7 @@ fn spawn_help_screen(commands: &mut Commands, font_res: Option<&FontResource>) { row_gap: VAL_SPACE_2, max_height: Val::Vh(70.0), overflow: Overflow::scroll_y(), + padding: UiRect::bottom(Val::Px(96.0)), ..default() }, ))