1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-29 04:40:03 -04:00

Make from_get_set public (#34)

This allows the slider value to be obtained from anywhere that can be accessed from a closure and not just a `&'a mut` reference. An example would be a state that is shared via an Arc<Rw<T>> or Atomic value with a background thread
This commit is contained in:
Hizoul
2020-10-28 16:56:33 +01:00
committed by GitHub
parent 07a32793d6
commit fe585e48e9

View File

@@ -49,7 +49,7 @@ pub struct Slider<'a> {
}
impl<'a> Slider<'a> {
fn from_get_set(
pub fn from_get_set(
range: RangeInclusive<f64>,
get_set_value: impl 'a + FnMut(Option<f64>) -> f64,
) -> Self {