Skip to content

Commit

Permalink
coametics
Browse files Browse the repository at this point in the history
  • Loading branch information
sor-ca committed Jul 20, 2023
1 parent ab29b80 commit 4310bdf
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,20 +158,24 @@ impl eframe::App for TemplateApp {
}

egui::SidePanel::left("side_panel").show(ctx, |ui| {
ui.heading("What time is it now?");
ui.heading("What time is it?");
ui.vertical(|ui| {
ui.horizontal(|ui| {

let size = (width / 20., height / 10.);
ui.add_sized(size, egui::DragValue::new(&mut hour)
.speed(0.1)
.clamp_range(0..=24));
.clamp_range(0..=24)
.custom_formatter(|h, _| format!("{h:02}"))
);
ui.label(" : ");
ui.add_sized(size, egui::DragValue::new(&mut minute)
.speed(0.1)
.clamp_range(-1..=60));

.clamp_range(-1..=60)
.custom_formatter(|m, _| format!("{m:02}"))
);
});

if minute == 60 {
//dbg!(minute);
self.change_hour = Hour::Next;
Expand Down

0 comments on commit 4310bdf

Please sign in to comment.