|
|
|
@ -26,12 +26,12 @@ impl Slider {
|
|
|
|
|
let blue = (0.0, 1.0, 1.0, 0.0);
|
|
|
|
|
let rg = (1.0, 1.0, 0.0, 0.0);
|
|
|
|
|
|
|
|
|
|
let left_guide_bar = Rect::new((position.0, position.1), (0.01, size.1), 1, red);
|
|
|
|
|
let right_guide_bar = Rect::new((position.0 + size.0, position.1), (0.01, size.1), 1, blue);
|
|
|
|
|
let line = Rect::new((position.0, position.1 - (size.1 / 2.0) ), (size.0, 0.01), 1, green);
|
|
|
|
|
let left_guide_bar = Rect::new((position.0, position.1), (2.0, size.1), 1, red);
|
|
|
|
|
let right_guide_bar = Rect::new((position.0 + size.0, position.1), (2.0, size.1), 1, blue);
|
|
|
|
|
let line = Rect::new((position.0, position.1 - (size.1 / 2.0) ), (size.0, 2.0), 1, green);
|
|
|
|
|
|
|
|
|
|
let scale = value as f32 / u16::max_value() as f32;
|
|
|
|
|
let handle = Rect::new((position.0 + (size.0 * scale), position.1), (0.03, size.1), 1, rg);
|
|
|
|
|
let handle = Rect::new((position.0 + (size.0 * scale), position.1), (15.0, size.1), 1, rg);
|
|
|
|
|
|
|
|
|
|
Slider {
|
|
|
|
|
handle: handle,
|
|
|
|
|