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

Add ui.add_enabled and ui.add_enabled_ui, and remove Button::enabled

This commit is contained in:
Emil Ernerfeldt
2021-10-17 22:17:50 +02:00
parent 8a47019c1a
commit 2af2e8bad5
7 changed files with 79 additions and 37 deletions

View File

@@ -53,9 +53,8 @@ impl super::Demo for WidgetGallery {
impl super::View for WidgetGallery {
fn ui(&mut self, ui: &mut egui::Ui) {
ui.scope(|ui| {
ui.add_enabled_ui(self.enabled, |ui| {
ui.set_visible(self.visible);
ui.set_enabled(self.enabled);
egui::Grid::new("my_grid")
.num_columns(2)