wolfrpg_map_parser/command/picture_command/zoom.rs
1#[cfg(feature = "serde")]
2use serde::{Serialize, Deserialize};
3
4#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5#[derive(PartialEq, Clone)]
6pub enum Zoom {
7 Normal = 0x00,
8 Different = 0x03,
9 Same = 0x04,
10 Unknown
11}
12
13impl Zoom {
14 pub const fn new(zoom: u8) -> Self {
15 match zoom {
16 0x00 => Zoom::Normal,
17 0x03 => Zoom::Different,
18 0x04 => Zoom::Same,
19 _ => Zoom::Unknown
20 }
21 }
22}