1
0
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:
lucasmerlin
2025-06-30 12:05:21 +02:00
parent 4e8e5e08ff
commit eba5651126
2 changed files with 2 additions and 2 deletions

View File

@@ -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`.

View File

@@ -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)