fix(engine): extend touch scroll to achievements and stats panels via generic helper

Extracts touch_scroll_panel<M: Component> into ui_modal.rs and wires it
to SettingsPanelScrollable, AchievementsScrollable, and StatsScrollable
so all three panels respond to finger swipe on Android.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-12 16:03:20 -07:00
parent 9af4046ac3
commit 7411468e10
4 changed files with 48 additions and 40 deletions
+3 -1
View File
@@ -203,6 +203,7 @@ impl Plugin for StatsPlugin {
// `DefaultPlugins`; register it explicitly so the stats-scroll
// system also runs cleanly under `MinimalPlugins` in tests.
.add_message::<MouseWheel>()
.add_message::<bevy::input::touch::TouchInput>()
// record_abandoned must read `move_count` BEFORE handle_new_game
// clobbers it with a fresh game. These are NOT in StatsUpdate because
// StatsUpdate (as a set) is ordered after GameMutation by external
@@ -238,7 +239,8 @@ impl Plugin for StatsPlugin {
)
.chain(),
)
.add_systems(Update, scroll_stats_panel);
.add_systems(Update, scroll_stats_panel)
.add_systems(Update, crate::ui_modal::touch_scroll_panel::<StatsScrollable>);
}
}