shared/domain/module/body/legacy/
design.rspub use super::*;
use serde::{Deserialize, Serialize};
use serde_with::skip_serializing_none;
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
pub struct Design {
pub bgs: Vec<String>,
pub stickers: Vec<Sticker>,
}
#[skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Sticker {
pub filename: String,
pub transform_matrix: [f64; 16],
pub hide: bool,
pub hide_toggle: Option<HideToggle>,
pub animation: Option<Animation>,
pub audio_filename: Option<String>,
pub override_size: Option<(f64, f64)>,
pub kind: StickerKind,
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
#[serde(rename_all = "snake_case")]
pub enum StickerKind {
Background,
Animation,
Image,
Text(Option<String>),
}
#[derive(Serialize, Deserialize, PartialEq, Debug, Clone, Copy)]
#[serde(rename_all = "snake_case")]
pub enum HideToggle {
Once,
Always,
}
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct Animation {
pub once: bool,
pub tap: bool,
}