1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use anim::transition::Transition;
use core::{prefab::Prefab, Ignite, Scalar};
use serde::{Deserialize, Serialize};
pub type BackgroundStyle = Transition<String>;
#[derive(Ignite, Debug, Default, Clone, Serialize, Deserialize)]
pub struct Background {
pub name: String,
pub image: String,
#[serde(default = "Background::default_scale")]
pub scale: Scalar,
}
impl Prefab for Background {}
impl Background {
fn default_scale() -> Scalar {
1.0
}
}