diff --git a/ezgui/src/widgets/slider.rs b/ezgui/src/widgets/slider.rs index 4c6ed52411..ea2a6d900a 100644 --- a/ezgui/src/widgets/slider.rs +++ b/ezgui/src/widgets/slider.rs @@ -4,7 +4,7 @@ use crate::{ hotkey, Canvas, Color, EventCtx, EventLoopMode, GeomBatch, GfxCtx, InputResult, Key, Line, ModalMenu, MultiKey, ScreenDims, ScreenPt, ScreenRectangle, Text, Warper, }; -use geom::{Distance, Duration, Polygon, Pt2D}; +use geom::{Distance, Polygon, Pt2D, Time}; pub struct Slider { current_percent: f64, @@ -409,16 +409,16 @@ impl WarpingItemSlider { } } -// TODO Hardcoded to Durations right now... +// TODO Hardcoded to Times right now... pub struct SliderWithTextBox { slider: Slider, tb: TextBox, - low: Duration, - high: Duration, + low: Time, + high: Time, } impl SliderWithTextBox { - pub fn new(prompt: &str, low: Duration, high: Duration, canvas: &Canvas) -> SliderWithTextBox { + pub fn new(prompt: &str, low: Time, high: Time, canvas: &Canvas) -> SliderWithTextBox { SliderWithTextBox { slider: Slider::new(canvas.text_dims(&Text::from(Line(prompt))).width), tb: TextBox::new(prompt, None, canvas), @@ -427,7 +427,7 @@ impl SliderWithTextBox { } } - pub fn event(&mut self, ctx: &mut EventCtx) -> InputResult { + pub fn event(&mut self, ctx: &mut EventCtx) -> InputResult