diff --git a/src/overlay/elements/leaderboard/deltaboard_grid.xml b/src/overlay/elements/leaderboard/deltaboard_grid.xml new file mode 100644 index 0000000..9f9f760 --- /dev/null +++ b/src/overlay/elements/leaderboard/deltaboard_grid.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/src/overlay/elements/leaderboard/leaderboard_entry.rs b/src/overlay/elements/leaderboard/leaderboard_entry.rs new file mode 100644 index 0000000..8a1acb4 --- /dev/null +++ b/src/overlay/elements/leaderboard/leaderboard_entry.rs @@ -0,0 +1,215 @@ +use std::sync::Arc; + +use anyhow::Result; + +use ui::prelude::*; +use utilities::prelude::Color; + +#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)] +pub enum BehindLeader { + Time(f64), + Laps(i32), +} + +pub struct LeaderBoardEntry { + id: i32, + + name: String, + place: u8, + behind: BehindLeader, + time_behind_next: f64, + best_lap: f64, + + snippet: Arc, + + name_label: Arc