mirror of
https://github.com/emilk/egui.git
synced 2026-06-27 07:03:14 -04:00
Rename to selectable
This commit is contained in:
@@ -2137,7 +2137,7 @@ impl Ui {
|
||||
/// See also [`SelectableLabel`] and [`Self::toggle_value`].
|
||||
#[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 {
|
||||
Button::selectable_value(checked, text).ui(self)
|
||||
Button::selectable(checked, text).ui(self)
|
||||
}
|
||||
|
||||
/// Show selectable text. It is selected if `*current_value == selected_value`.
|
||||
|
||||
@@ -66,7 +66,7 @@ impl<'a> Button<'a> {
|
||||
/// See also:
|
||||
/// - [`Ui::selectable_value`]
|
||||
/// - [`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)
|
||||
.selected(selected)
|
||||
.frame_when_inactive(selected)
|
||||
|
||||
Reference in New Issue
Block a user