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 {