Use fill_rectangle for cursor in game_of_life
This commit is contained in:
parent
404122e0b1
commit
f9227546ca
1 changed files with 1 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue