Skip to content

Commit

Permalink
add instruction panel and text
Browse files Browse the repository at this point in the history
  • Loading branch information
bernh committed Mar 4, 2024
1 parent 8f81f6d commit fa7d8e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/egui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ fn paces_to_strings(input: &HashMap<String, f32>) -> HashMap<String, String> {
impl eframe::App for WorkoutApp {
/// Called each time the UI needs repainting, which may be many times per second.
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
ui.heading("Instructions");
ui.label("Workouts can be constructed from the defined intensities.");
ui.label("Distances >= 100 are interpreted as meters, otherwise km.");
ui.label("Durations can be specified by adding 'min'");
ui.label("");
ui.label("Example: 2E + 5 * (400 R + 2 min rst) + 10 min E");
});

egui::SidePanel::left("left_panel").show(ctx, |ui| {
ui.vertical(|ui| {
ui.heading("Intensities");
Expand Down Expand Up @@ -116,6 +125,7 @@ impl eframe::App for WorkoutApp {
}
});
});

egui::CentralPanel::default().show(ctx, |ui| {
ui.horizontal(|ui| {
ui.vertical(|ui| {
Expand Down

0 comments on commit fa7d8e3

Please sign in to comment.