diff options
author | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-28 18:08:41 +0100 |
---|---|---|
committer | Lizzy Fleckenstein <eliasfleckenstein@web.de> | 2023-02-28 18:09:05 +0100 |
commit | 85d55e42119ea80cd1cd9e9e34c05ea7d07b3a88 (patch) | |
tree | 416c228135ab6dbf71ebba6c0a520ed8225476dd /src/to_clt/hud.rs | |
parent | 060a3bd858cc76365bfa8b1fd356211e7eb11cbf (diff) | |
download | mt_net-85d55e42119ea80cd1cd9e9e34c05ea7d07b3a88.tar.xz |
Use cgmath and support BS constant
Diffstat (limited to 'src/to_clt/hud.rs')
-rw-r--r-- | src/to_clt/hud.rs | 24 |
1 files changed, 12 insertions, 12 deletions
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<f32>) = 0, Name(String), - Scale([f32; 2]), + Scale(Vector2<f32>), Text(String), Number(u32), Item(u32), Dir(u32), - Align([f32; 2]), - Offset([f32; 2]), - WorldPos([f32; 3]), - Size([i32; 2]), + Align(Vector2<f32>), + Offset(Vector2<f32>), + WorldPos(Point3<f32>), + Size(Vector2<i32>), ZIndex(i32), // this is i16 in HudAdd, minetest is weird Text2(String), Style(EnumSet<HudStyleFlag>), @@ -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<f32>, pub name: String, - pub scale: [f32; 2], + pub scale: Vector2<f32>, 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<f32>, + pub offset: Vector2<f32>, + pub world_pos: Point3<f32>, + pub size: Vector2<i32>, pub z_index: i16, pub text_2: String, pub style: EnumSet<HudStyleFlag>, |