From 592c16874270535e1ad2796b22fbc9e381373acd Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sun, 29 Sep 2024 03:55:59 +0200 Subject: [PATCH] egui: show unit (s) in frame timestep's slider --- src/bin/topola-egui/top.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/topola-egui/top.rs b/src/bin/topola-egui/top.rs index 6ebdda1..f6f1977 100644 --- a/src/bin/topola-egui/top.rs +++ b/src/bin/topola-egui/top.rs @@ -179,10 +179,10 @@ impl Top { ui.separator(); ui.label(tr.text("frame-timestep")); - ui.add(egui::widgets::Slider::new( - &mut self.frame_timestep, - 0.0..=3.0, - )); + ui.add( + egui::widgets::Slider::new(&mut self.frame_timestep, 0.0..=3.0) + .suffix(" s"), + ); }); ui.menu_button(tr.text("menu-place"), |ui| {