Multisample UI elements and filter negativ values #7
1 changed files with 4 additions and 2 deletions
|
@ -149,7 +149,7 @@ impl LeaderBoardEntry {
|
|||
match self.behind {
|
||||
BehindLeader::Time(time_behind) => {
|
||||
// check if we are leader
|
||||
if time_behind == 0.0 {
|
||||
if time_behind <= 0.0 {
|
||||
self.time_label.set_text("---")?;
|
||||
} else {
|
||||
let text = if time_behind > 60.0 {
|
||||
|
@ -221,7 +221,9 @@ impl LeaderBoardEntry {
|
|||
}
|
||||
|
||||
pub fn force_display_behind_next(&mut self) -> Result<()> {
|
||||
let text = if self.time_behind_next > 60.0 {
|
||||
let text = if self.time_behind_next <= 0.0 {
|
||||
"---".to_string()
|
||||
} else if self.time_behind_next > 60.0 {
|
||||
let full_minutes = (self.time_behind_next / 60.0).floor();
|
||||
let remainder = self.time_behind_next - (full_minutes * 60.0);
|
||||
|
||||
|
|
Loading…
Reference in a new issue