mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +01:00
input: Rename MouseWheel -> Wheel
This commit is contained in:
parent
b6f0ea0100
commit
237f6a2014
6
input.go
6
input.go
@ -52,10 +52,10 @@ func CursorPosition() (x, y int) {
|
||||
return ui.AdjustedCursorPosition()
|
||||
}
|
||||
|
||||
// MouseWheel returns the x and y offset of the scroll wheel.
|
||||
// MouseWheel returns the x and y offset of the mouse wheel or touchpad scroll.
|
||||
// It returns 0 if the wheel isn't being rolled.
|
||||
func MouseWheel() (xoff, yoff float64) {
|
||||
return input.Get().MouseWheel()
|
||||
func Wheel() (xoff, yoff float64) {
|
||||
return input.Get().Wheel()
|
||||
}
|
||||
|
||||
// IsMouseButtonPressed returns a boolean indicating whether mouseButton is pressed.
|
||||
|
@ -92,7 +92,7 @@ func (i *Input) IsMouseButtonPressed(button MouseButton) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (i *Input) MouseWheel() (xoff, yoff float64) {
|
||||
func (i *Input) Wheel() (xoff, yoff float64) {
|
||||
i.m.RLock()
|
||||
defer i.m.RUnlock()
|
||||
return i.scrollX, i.scrollY
|
||||
|
@ -91,7 +91,7 @@ func (i *Input) IsMouseButtonPressed(button MouseButton) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (i *Input) MouseWheel() (xoff, yoff float64) {
|
||||
func (i *Input) Wheel() (xoff, yoff float64) {
|
||||
return 0, 0
|
||||
// TODO: Mouse scroll functionality is not yet implemented in js
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ func (i *Input) IsKeyPressed(key Key) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (i *Input) MouseWheel() (xoff, yoff float64) {
|
||||
func (i *Input) Wheel() (xoff, yoff float64) {
|
||||
return 0, 0
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user