diff options
Diffstat (limited to 'server/protocol')
| -rw-r--r-- | server/protocol/src/lib.rs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/server/protocol/src/lib.rs b/server/protocol/src/lib.rs index a89d9c30..2d9aa0f0 100644 --- a/server/protocol/src/lib.rs +++ b/server/protocol/src/lib.rs @@ -16,7 +16,7 @@ */ use crate::book::Book; -use glam::{IVec2, Vec2}; +use glam::{IVec2, Vec2, Vec3}; use helpers::deser::*; use serde::{Deserialize, Serialize}; use std::{ @@ -381,12 +381,13 @@ pub enum ItemLocation { #[derive(Debug, Clone, Serialize, Deserialize)] pub struct DebugEvent { - key: String, - display: Vec<DebugEventDisplay>, - timeout: Option<f32>, + pub key: String, + pub color: Vec3, + pub display: DebugEventDisplay, } #[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "snake_case", tag = "ty")] pub enum DebugEventDisplay { - Path(Vec<Vec2>), - Label(Vec2, String), + Path { points: Vec<Vec2> }, + Label { pos: Vec2, text: String }, } |