From 85d55e42119ea80cd1cd9e9e34c05ea7d07b3a88 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Tue, 28 Feb 2023 18:08:41 +0100 Subject: Use cgmath and support BS constant --- src/to_clt/hud.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/to_clt/hud.rs') diff --git a/src/to_clt/hud.rs b/src/to_clt/hud.rs index 3b2a456..b0f56d9 100644 --- a/src/to_clt/hud.rs +++ b/src/to_clt/hud.rs @@ -9,17 +9,17 @@ pub enum HudStyleFlag { #[mt_derive(to = "clt", repr = "u8", tag = "attribute", content = "value")] pub enum HudChange { - Pos([f32; 2]) = 0, + Pos(Point2) = 0, Name(String), - Scale([f32; 2]), + Scale(Vector2), Text(String), Number(u32), Item(u32), Dir(u32), - Align([f32; 2]), - Offset([f32; 2]), - WorldPos([f32; 3]), - Size([i32; 2]), + Align(Vector2), + Offset(Vector2), + WorldPos(Point3), + Size(Vector2), ZIndex(i32), // this is i16 in HudAdd, minetest is weird Text2(String), Style(EnumSet), @@ -38,17 +38,17 @@ pub enum HudType { #[mt_derive(to = "clt")] pub struct HudElement { pub hud_type: HudType, - pub pos: [f32; 2], + pub pos: Point2, pub name: String, - pub scale: [f32; 2], + pub scale: Vector2, pub text: String, pub number: u32, pub item: u32, pub dir: u32, - pub align: [f32; 2], - pub offset: [f32; 2], - pub world_pos: [f32; 3], - pub size: [i32; 2], + pub align: Vector2, + pub offset: Vector2, + pub world_pos: Point3, + pub size: Vector2, pub z_index: i16, pub text_2: String, pub style: EnumSet, -- cgit v1.2.3