Add getters for current and max value in SliderView (#353)

This commit is contained in:
Mark LeMoine 2019-06-07 09:47:48 -07:00 committed by Alexandre Bury
parent 23d65aa9dc
commit 39e14d8c93

View File

@ -63,6 +63,16 @@ impl SliderView {
})
}
/// Gets the current value.
pub fn get_value(&self) -> usize {
self.value
}
/// Gets the max value.
pub fn get_max_value(&self) -> usize {
self.max_value
}
/// Sets a callback to be called when the slider is moved.
pub fn on_change<F>(mut self, callback: F) -> Self
where