aboutsummaryrefslogtreecommitdiffstats
path: root/examples/imageviewer/button.go
diff options
context:
space:
mode:
authorfaiface <faiface2202@gmail.com>2019-05-07 01:19:06 +0200
committerfaiface <faiface2202@gmail.com>2019-05-07 01:19:06 +0200
commitf2f7b00ab803499424c55f56a18bdf477b3b9b76 (patch)
treed12b260b3c7966edb4cdd85296101cf07d7629fc /examples/imageviewer/button.go
parent875b12b4a0c49f7bc0ae3ba6c4a0b842f2a8653f (diff)
downloadgui-f2f7b00ab803499424c55f56a18bdf477b3b9b76.zip
minor
Diffstat (limited to 'examples/imageviewer/button.go')
-rw-r--r--examples/imageviewer/button.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/imageviewer/button.go b/examples/imageviewer/button.go
index e012a08..8d448e4 100644
--- a/examples/imageviewer/button.go
+++ b/examples/imageviewer/button.go
@@ -34,11 +34,11 @@ func Button(env gui.Env, theme *Theme, text string, action func()) {
)
for e := range env.Events() {
- var x, y, minX, minY, maxX, maxY int
+ var x, y, x0, y0, x1, y1 int
switch {
- case e.Matches("resize/%d/%d/%d/%d", &minX, &minY, &maxX, &maxY):
- r = image.Rect(minX, minY, maxX, maxY)
+ case e.Matches("resize/%d/%d/%d/%d", &x0, &y0, &x1, &y1):
+ r = image.Rect(x0, y0, x1, y1)
env.Draw() <- redraw(r, over, pressed)
case e.Matches("mo/down/%d/%d/left", &x, &y):