are there better ways to do this?
#[derive(EnumIter, Display, Default, PartialEq, Eq, Debug, Clone, Copy, Deserialize, Serialize)]
pub enum Resolution {
R640_360,
R1280_720,
R1360_768,
R1536_864,
R1600_900,
#[default]
R1920_1080,
R2048_1152,
R2560_1080,
R2560_1440,
R3840_2160,
}
impl Into<Vec2> for Resolution {
fn into(self) -> Vec2 {
match self {
Resolution::R640_360 => Vec2::new(640., 360.),
Resolution::R1280_720 => Vec2::new(1280., 720.),
Resolution::R1360_768 => Vec2::new(1360., 768.),
Resolution::R1536_864 => Vec2::new(1536., 864.),
Resolution::R1600_900 => Vec2::new(1600., 900.),
Resolution::R1920_1080 => Vec2::new(1920., 1080.),
Resolution::R2048_1152 => Vec2::new(2048., 1152.),
Resolution::R2560_1080 => Vec2::new(2560., 1080.),
Resolution::R2560_1440 => Vec2::new(2560., 1440.),
Resolution::R3840_2160 => Vec2::new(3840., 2160.),
}
}
}