From 242d36a9a425e7600e60e67b3aed4c331896dc9c Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 19 Apr 2016 02:45:51 +0900 Subject: [PATCH] examples/audio: Add padding --- examples/audio/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/audio/main.go b/examples/audio/main.go index 1e3e3560c..c40ad12ce 100644 --- a/examples/audio/main.go +++ b/examples/audio/main.go @@ -165,7 +165,8 @@ func (p *Player) updateBar() error { } x, y := ebiten.CursorPosition() bx, by, bw, bh := playerBarRect() - if y < by || by+bh <= y { + const padding = 4 + if y < by-padding || by+bh+padding <= y { return nil } if x < bx || bx+bw <= x {