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:
@@ -28,6 +28,11 @@ use crate::events::{
|
||||
CardFlippedEvent, DrawRequestEvent, FoundationCompletedEvent, GameWonEvent, InfoToastEvent,
|
||||
MoveRequestEvent, NewGameRequestEvent, StateChangedEvent, UndoRequestEvent,
|
||||
};
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
const NO_MOVES_MSG: &str = "No moves available — tap the stock to draw or start a new game";
|
||||
#[cfg(not(target_os = "android"))]
|
||||
const NO_MOVES_MSG: &str = "No moves available — press D to draw or N for a new game";
|
||||
use crate::font_plugin::FontResource;
|
||||
use crate::resources::{DragState, GameStateResource, SyncStatusResource};
|
||||
use crate::ui_modal::{
|
||||
@@ -1107,11 +1112,7 @@ fn check_no_moves(
|
||||
}
|
||||
|
||||
if !moves_ok && !*already_fired {
|
||||
#[cfg(target_os = "android")]
|
||||
let no_moves_msg = "No moves available \u{2014} tap the stock to draw or start a new game";
|
||||
#[cfg(not(target_os = "android"))]
|
||||
let no_moves_msg = "No moves available \u{2014} press D to draw or N for a new game";
|
||||
toast.write(InfoToastEvent(no_moves_msg.to_string()));
|
||||
toast.write(InfoToastEvent(NO_MOVES_MSG.to_string()));
|
||||
*already_fired = true;
|
||||
// Only spawn the overlay if one does not already exist, and no other
|
||||
// modal scrim is currently open (global ModalScrim guard).
|
||||
|
||||
Reference in New Issue
Block a user