refactor(engine): audit and rationalize platform cfg gates (closes #49)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -287,12 +287,21 @@ fn spawn_slide(commands: &mut Commands, index: u8, font_res: Option<&FontResourc
|
||||
0 => spawn_slide_welcome(commands, font_res),
|
||||
1 => spawn_slide_how_to_play(commands, font_res),
|
||||
// Slide 2 (keyboard shortcuts) is desktop-only; Android has no keyboard.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
2 => spawn_slide_hotkeys(commands, font_res),
|
||||
2 => spawn_slide_hotkeys_if_available(commands, font_res),
|
||||
_ => spawn_slide_welcome(commands, font_res),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
fn spawn_slide_hotkeys_if_available(commands: &mut Commands, font_res: Option<&FontResource>) {
|
||||
spawn_slide_hotkeys(commands, font_res);
|
||||
}
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
fn spawn_slide_hotkeys_if_available(commands: &mut Commands, font_res: Option<&FontResource>) {
|
||||
spawn_slide_welcome(commands, font_res);
|
||||
}
|
||||
|
||||
/// Slide 1 — Welcome.
|
||||
fn spawn_slide_welcome(commands: &mut Commands, font_res: Option<&FontResource>) {
|
||||
spawn_modal(commands, OnboardingScreen, Z_ONBOARDING, |card| {
|
||||
|
||||
Reference in New Issue
Block a user