Skip to content

Commit

Permalink
fix: remove debug draw count message
Browse files Browse the repository at this point in the history
  • Loading branch information
Beastwick18 committed May 30, 2024
1 parent 4ff7a6a commit 70d4767
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
17 changes: 2 additions & 15 deletions src/widget/notify_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,24 +226,11 @@ impl NotifyBox {
}

pub fn update(&mut self, deltatime: f64, area: Rect) -> bool {
// let (start_pos, stop_pos) =
// self.position
// .get_start_stop(area, self.width, self.height, self.offset);
// let last_pos = self.pos;
// let pos = match self.time >= 1.0 {
// false => self
// .enter_state
// .linear(start_pos, stop_pos, ANIM_SPEED, deltatime),
// true => self
// .leave_state
// .linear(stop_pos, start_pos, ANIM_SPEED, deltatime),
// };

let last_pos = self.pos;
self.pos = Some(self.next_pos(deltatime, area));
if self.enter_state.is_done() {
self.time = 1.0_f64.min(self.time + deltatime / self.duration);
}
let last_pos = self.pos;
self.pos = Some(self.next_pos(deltatime, area));
last_pos != self.pos
}
}
12 changes: 5 additions & 7 deletions src/widget/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,11 @@ impl super::Widget for ResultsWidget {
}
}

// if let Some(notif) = ctx.notification.clone() {
if let Some((bl, area)) =
TitlePosition::BottomLeft.try_widget(format!("{} draws", self.draw_count), area, false)
{
f.render_widget(bl, area);
self.draw_count += 1;
}
// if let Some((bl, area)) =
// TitlePosition::BottomLeft.try_widget(format!("{} draws", self.draw_count), area, false)
// {
// f.render_widget(bl, area);
// self.draw_count += 1;
// }
}

Expand Down

0 comments on commit 70d4767

Please sign in to comment.