aboutsummaryrefslogtreecommitdiff
path: root/server/protocol
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-10-20 20:58:14 +0200
committermetamuffin <metamuffin@disroot.org>2025-10-21 00:18:11 +0200
commiteaed442578c3b1765ec48c84489a122096b6a08f (patch)
treebd5eeb82ea6f49691a4c5bad91a1b1614f0948a8 /server/protocol
parenta3b0879a98bf5a0881b426913d7dd4cb9010e327 (diff)
downloadhurrycurry-eaed442578c3b1765ec48c84489a122096b6a08f.tar
hurrycurry-eaed442578c3b1765ec48c84489a122096b6a08f.tar.bz2
hurrycurry-eaed442578c3b1765ec48c84489a122096b6a08f.tar.zst
Send paths as debug events
Diffstat (limited to 'server/protocol')
-rw-r--r--server/protocol/src/lib.rs13
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 },
}