From eaed442578c3b1765ec48c84489a122096b6a08f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 20 Oct 2025 20:58:14 +0200 Subject: Send paths as debug events --- server/protocol/src/lib.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'server/protocol') 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, - timeout: Option, + 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), - Label(Vec2, String), + Path { points: Vec }, + Label { pos: Vec2, text: String }, } -- cgit v1.3