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:
funman300
2026-05-27 18:00:57 -07:00
parent 561395fca6
commit ce536b0176
13 changed files with 302 additions and 243 deletions
+2 -1
View File
@@ -55,6 +55,7 @@ use bevy::window::PrimaryWindow;
use solitaire_data::AnimSpeed;
use crate::font_plugin::FontResource;
use crate::platform::SHOW_KEYBOARD_ACCELERATORS;
use crate::settings_plugin::SettingsResource;
use crate::ui_theme::{
scaled_duration, ACCENT_PRIMARY, ACCENT_PRIMARY_HOVER, ACCENT_SECONDARY, BG_BASE, BG_ELEVATED,
@@ -342,7 +343,7 @@ pub fn spawn_modal_button<M: Component>(
variant: ButtonVariant,
font_res: Option<&FontResource>,
) {
let hotkey = if cfg!(target_os = "android") { None } else { hotkey };
let hotkey = if SHOW_KEYBOARD_ACCELERATORS { hotkey } else { None };
let font_handle = font_res.map(|f| f.0.clone()).unwrap_or_default();
let font_label = TextFont {
font: font_handle.clone(),