diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2026-02-25 18:22:31 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2026-02-25 18:22:31 -0500 |
| commit | 7ed10a4fc3c95244d347aa313f0d334aab962f80 (patch) | |
| tree | 9f1e1806c87ac7de22d6abe5696f30aff2f8da2d /examples/paint/main.go | |
| parent | 63095aa509e2e3ce113a2681db520d2961284f71 (diff) | |
| download | gui-7ed10a4fc3c95244d347aa313f0d334aab962f80.zip | |
update examples to use new Env interface
Diffstat (limited to 'examples/paint/main.go')
| -rw-r--r-- | examples/paint/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/paint/main.go b/examples/paint/main.go index fec06c3..7aa0179 100644 --- a/examples/paint/main.go +++ b/examples/paint/main.go @@ -26,7 +26,7 @@ func ColorPicker(env gui.Env, pick chan<- color.Color, r image.Rectangle, clr co } } - close(env.Draw()) + env.Close() } func Canvas(env gui.Env, pick <-chan color.Color, r image.Rectangle) { @@ -51,7 +51,7 @@ func Canvas(env gui.Env, pick <-chan color.Color, r image.Rectangle) { case event, ok := <-env.Events(): if !ok { - close(env.Draw()) + env.Close() return } @@ -118,7 +118,7 @@ func run() { for event := range env.Events() { switch event.(type) { case win.WiClose: - close(env.Draw()) + env.Close() } } } |