Use fill_rectangle for cursor in game_of_life

This commit is contained in:
Héctor Ramón Jiménez 2020-05-01 04:41:04 +02:00
parent 404122e0b1
commit f9227546ca

View File

@ -339,13 +339,9 @@ mod grid {
let cell =
Cell::at(self.project(cursor_position, frame.size()));
let interaction = Path::rectangle(
frame.fill_rectangle(
Point::new(cell.j as f32, cell.i as f32),
Size::UNIT,
);
frame.fill(
&interaction,
Color {
a: 0.5,
..Color::BLACK