summaryrefslogtreecommitdiffstats
path: root/examples/game_of_life
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-01 04:41:04 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-05-01 04:41:04 +0200
commitf9227546ca975bf3bf7f293d10e79004935b8645 (patch)
treed9e7e2843922f2360860b1c9e9ddb3d5e434a8bc /examples/game_of_life
parent404122e0b17300aa46cdb5ec5f0366f24b8ea931 (diff)
downloadiced-f9227546ca975bf3bf7f293d10e79004935b8645.tar.gz
iced-f9227546ca975bf3bf7f293d10e79004935b8645.tar.bz2
iced-f9227546ca975bf3bf7f293d10e79004935b8645.zip
Use `fill_rectangle` for cursor in `game_of_life`
Diffstat (limited to 'examples/game_of_life')
-rw-r--r--examples/game_of_life/src/main.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs
index d9ff5a14..ef040263 100644
--- a/examples/game_of_life/src/main.rs
+++ b/examples/game_of_life/src/main.rs
@@ -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