Fix "1 cells" overlay in game_of_life
This commit is contained in:
parent
5aaaea7c88
commit
4417a34edb
@ -435,16 +435,19 @@ mod grid {
|
||||
|
||||
if let Some(cell) = hovered_cell {
|
||||
frame.fill_text(Text {
|
||||
content: format!("({}, {})", cell.i, cell.j),
|
||||
content: format!("({}, {})", cell.j, cell.i),
|
||||
position: text.position - Vector::new(0.0, 16.0),
|
||||
..text
|
||||
});
|
||||
}
|
||||
|
||||
let cell_count = self.state.cell_count();
|
||||
|
||||
frame.fill_text(Text {
|
||||
content: format!(
|
||||
"{} cells @ {:?} ({})",
|
||||
self.state.cell_count(),
|
||||
"{} cell{} @ {:?} ({})",
|
||||
cell_count,
|
||||
if cell_count == 1 { "" } else { "s" },
|
||||
self.last_tick_duration,
|
||||
self.last_queued_ticks
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user