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

@@ -262,7 +262,7 @@ impl CodeTheme {
};
if ui
.add(egui::Button::new("Reset theme").enabled(*self != reset_value))
.add_enabled(*self != reset_value, egui::Button::new("Reset theme"))
.clicked()
{
*self = reset_value;