mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 05:10:03 -04:00
Rename to selectable
This commit is contained in:
@@ -2137,7 +2137,7 @@ impl Ui {
|
|||||||
/// See also [`SelectableLabel`] and [`Self::toggle_value`].
|
/// See also [`SelectableLabel`] and [`Self::toggle_value`].
|
||||||
#[must_use = "You should check if the user clicked this with `if ui.selectable_label(…).clicked() { … } "]
|
#[must_use = "You should check if the user clicked this with `if ui.selectable_label(…).clicked() { … } "]
|
||||||
pub fn selectable_label<'a>(&mut self, checked: bool, text: impl IntoAtoms<'a>) -> Response {
|
pub fn selectable_label<'a>(&mut self, checked: bool, text: impl IntoAtoms<'a>) -> Response {
|
||||||
Button::selectable_value(checked, text).ui(self)
|
Button::selectable(checked, text).ui(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Show selectable text. It is selected if `*current_value == selected_value`.
|
/// Show selectable text. It is selected if `*current_value == selected_value`.
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ impl<'a> Button<'a> {
|
|||||||
/// See also:
|
/// See also:
|
||||||
/// - [`Ui::selectable_value`]
|
/// - [`Ui::selectable_value`]
|
||||||
/// - [`Ui::selectable_label`]
|
/// - [`Ui::selectable_label`]
|
||||||
pub fn selectable_value(selected: bool, atoms: impl IntoAtoms<'a>) -> Self {
|
pub fn selectable(selected: bool, atoms: impl IntoAtoms<'a>) -> Self {
|
||||||
Self::new(atoms)
|
Self::new(atoms)
|
||||||
.selected(selected)
|
.selected(selected)
|
||||||
.frame_when_inactive(selected)
|
.frame_when_inactive(selected)
|
||||||
|
|||||||
Reference in New Issue
Block a user