Use fill_rectangle
for cursor in game_of_life
This commit is contained in:
parent
404122e0b1
commit
f9227546ca
@ -339,13 +339,9 @@ mod grid {
|
|||||||
let cell =
|
let cell =
|
||||||
Cell::at(self.project(cursor_position, frame.size()));
|
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),
|
Point::new(cell.j as f32, cell.i as f32),
|
||||||
Size::UNIT,
|
Size::UNIT,
|
||||||
);
|
|
||||||
|
|
||||||
frame.fill(
|
|
||||||
&interaction,
|
|
||||||
Color {
|
Color {
|
||||||
a: 0.5,
|
a: 0.5,
|
||||||
..Color::BLACK
|
..Color::BLACK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user