Struct me3_framework::overlay::RadioButton
source · [−]pub struct RadioButton { /* private fields */ }
Expand description
One out of several alternatives, either selected or not.
Usually you’d use Ui::radio_value
or Ui::radio
instead.
#[derive(PartialEq)]
enum Enum { First, Second, Third }
let mut my_enum = Enum::First;
ui.radio_value(&mut my_enum, Enum::First, "First");
// is equivalent to:
if ui.add(egui::RadioButton::new(my_enum == Enum::First, "First")).clicked() {
my_enum = Enum::First
}
Implementations
sourceimpl RadioButton
impl RadioButton
pub fn new(checked: bool, text: impl Into<WidgetText>) -> RadioButton
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RadioButton
impl Send for RadioButton
impl Sync for RadioButton
impl Unpin for RadioButton
impl UnwindSafe for RadioButton
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more