ce536b0176
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
32 lines
1.2 KiB
Rust
32 lines
1.2 KiB
Rust
//! Platform abstraction layer.
|
|
//!
|
|
//! Target-specific implementations live here so gameplay and rendering systems
|
|
//! can depend on stable engine-facing abstractions instead of sprinkling
|
|
//! `#[cfg(...)]` branches through UI code.
|
|
|
|
pub mod clipboard;
|
|
pub mod storage;
|
|
pub mod time;
|
|
|
|
#[cfg(target_os = "android")]
|
|
/// `false` on touch-first Android builds, where UI buttons replace keyboard chips.
|
|
pub const SHOW_KEYBOARD_ACCELERATORS: bool = false;
|
|
#[cfg(not(target_os = "android"))]
|
|
/// `true` on desktop builds, where keyboard chips should be rendered.
|
|
pub const SHOW_KEYBOARD_ACCELERATORS: bool = true;
|
|
|
|
#[cfg(target_os = "android")]
|
|
/// `true` when the engine should prefer touch-optimised HUD affordances.
|
|
pub const USE_TOUCH_UI_LAYOUT: bool = true;
|
|
#[cfg(not(target_os = "android"))]
|
|
/// `false` when the engine should prefer desktop HUD affordances.
|
|
pub const USE_TOUCH_UI_LAYOUT: bool = false;
|
|
|
|
pub use clipboard::{ClipboardBackend, ClipboardBackendResource, default_clipboard_backend};
|
|
#[cfg(not(target_arch = "wasm32"))]
|
|
pub use storage::NativeStorage;
|
|
#[cfg(target_arch = "wasm32")]
|
|
pub use storage::WasmStorage;
|
|
pub use storage::{StorageBackend, StorageBackendResource, default_storage_backend};
|
|
pub use time::PlatformTime;
|