mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Remove MouseButtonMax
This commit is contained in:
parent
bc26690b14
commit
7677d885a2
@ -37,7 +37,7 @@ func (i *input) update(window *glfw.Window, scale int) {
|
||||
for g, e := range glfwKeyCodeToKey {
|
||||
i.keyPressed[e] = window.GetKey(g) == glfw.Press
|
||||
}
|
||||
for b := MouseButtonLeft; b < MouseButtonMax; b++ {
|
||||
for b := 0; b < len(i.mouseButtonPressed); b++ {
|
||||
i.mouseButtonPressed[b] = window.GetMouseButton(glfw.MouseButton(b)) == glfw.Press
|
||||
}
|
||||
x, y := window.GetCursorPosition()
|
||||
|
@ -20,5 +20,4 @@ const (
|
||||
MouseButtonLeft MouseButton = iota
|
||||
MouseButtonRight
|
||||
MouseButtonMiddle
|
||||
MouseButtonMax
|
||||
)
|
||||
|
@ -26,5 +26,4 @@ const (
|
||||
MouseButtonLeft = MouseButton(ui.MouseButtonLeft)
|
||||
MouseButtonRight = MouseButton(ui.MouseButtonRight)
|
||||
MouseButtonMiddle = MouseButton(ui.MouseButtonMiddle)
|
||||
MouseButtonMax = MouseButton(ui.MouseButtonMax)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user