mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-09 10:50:40 +00:00
Add getters for current and max value in SliderView (#353)
This commit is contained in:
parent
23d65aa9dc
commit
39e14d8c93
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user