From bf950222447d2d8486bf45ca244827b8399ea168 Mon Sep 17 00:00:00 2001 From: Victoria Brekenfeld Date: Mon, 30 Jan 2023 15:53:30 +0100 Subject: [PATCH] debug: Add input states --- src/debug.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/debug.rs b/src/debug.rs index b0bb1084..d4bcf50e 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -178,6 +178,18 @@ pub fn fps_ui( plot_ui.bar_chart(screencopy_chart); plot_ui.bar_chart(display_chart); }); + + ui.separator(); + ui.label(egui::RichText::new("Input States").heading()); + for (num, seat) in state.seats().enumerate() { + ui.label(egui::RichText::new(format!("\tseat-{}", num)).strong()); + if let Some(ptr) = seat.get_pointer() { + ui.label(egui::RichText::new(format!("{:#?}", ptr)).code()); + } + if let Some(kbd) = seat.get_keyboard() { + ui.label(egui::RichText::new(format!("{:#?}", kbd)).code()); + } + } } }); },