mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -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:
@@ -49,7 +49,7 @@ pub struct Slider<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Slider<'a> {
|
impl<'a> Slider<'a> {
|
||||||
fn from_get_set(
|
pub fn from_get_set(
|
||||||
range: RangeInclusive<f64>,
|
range: RangeInclusive<f64>,
|
||||||
get_set_value: impl 'a + FnMut(Option<f64>) -> f64,
|
get_set_value: impl 'a + FnMut(Option<f64>) -> f64,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user