oxygengine_visual_novel/
background.rs

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