Add Checkbox::without_text

Closes https://github.com/emilk/egui/pull/2508
This commit is contained in:
Emil Ernerfeldt 2023-02-08 08:42:00 +01:00
parent 8bc88c9bf4
commit 8d6c2580f4

View file

@ -269,6 +269,10 @@ impl<'a> Checkbox<'a> {
text: text.into(),
}
}
pub fn without_text(checked: &'a mut bool) -> Self {
Self::new(checked, WidgetText::default())
}
}
impl<'a> Widget for Checkbox<'a> {