1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Add ui.set_enabled(false) to disable all widgets in a Ui

Closes https://github.com/emilk/egui/issues/50
This commit is contained in:
Emil Ernerfeldt
2021-02-07 10:55:45 +01:00
parent d07a17ac6a
commit bca722ddf8
20 changed files with 303 additions and 77 deletions

View File

@@ -83,9 +83,12 @@ fn toggle_compact(ui: &mut egui::Ui, on: &mut bool) -> egui::Response {
pub fn demo(ui: &mut egui::Ui, on: &mut bool) {
ui.horizontal_wrapped_for_text(egui::TextStyle::Button, |ui| {
ui.label("It's easy to create your own widgets!");
ui.label("This toggle switch is just one function and 15 lines of code:");
toggle(ui, on).on_hover_text("Click to toggle");
ui.add(crate::__egui_github_link_file!());
});
})
.1
.on_hover_text(
"It's easy to create your own widgets!\n\
This toggle switch is just one function and 20 lines of code.",
);
}