mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
examples/audio: Add padding
This commit is contained in:
parent
895c559b8e
commit
242d36a9a4
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user