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

Deprecate old Slider constructors in favor of Slider::new

This commit is contained in:
Emil Ernerfeldt
2021-03-27 16:07:18 +01:00
parent 5481aa8d98
commit de439b6e21
16 changed files with 58 additions and 55 deletions

View File

@@ -58,7 +58,7 @@ ui.horizontal(|ui| {
ui.label("Your name: ");
ui.text_edit_singleline(&mut name);
});
ui.add(egui::Slider::u32(&mut age, 0..=120).text("age"));
ui.add(egui::Slider::new(&mut age, 0..=120).text("age"));
if ui.button("Click each year").clicked() {
age += 1;
}