mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
ebiten: swap the definition MouseButtonMiddle and MouseButtonRight
This follows the Web standard. Closes #2468
This commit is contained in:
parent
f37deea6e2
commit
3386908902
@ -150,8 +150,8 @@ func (i *Input) Wheel() (xoff, yoff float64) {
|
|||||||
|
|
||||||
var glfwMouseButtonToMouseButton = map[glfw.MouseButton]MouseButton{
|
var glfwMouseButtonToMouseButton = map[glfw.MouseButton]MouseButton{
|
||||||
glfw.MouseButtonLeft: MouseButton0,
|
glfw.MouseButtonLeft: MouseButton0,
|
||||||
glfw.MouseButtonRight: MouseButton1,
|
glfw.MouseButtonMiddle: MouseButton1,
|
||||||
glfw.MouseButtonMiddle: MouseButton2,
|
glfw.MouseButtonRight: MouseButton2,
|
||||||
glfw.MouseButton3: MouseButton3,
|
glfw.MouseButton3: MouseButton3,
|
||||||
glfw.MouseButton4: MouseButton4,
|
glfw.MouseButton4: MouseButton4,
|
||||||
}
|
}
|
||||||
|
@ -127,8 +127,8 @@ func (i *Input) IsKeyPressed(key Key) bool {
|
|||||||
|
|
||||||
var codeToMouseButton = map[int]MouseButton{
|
var codeToMouseButton = map[int]MouseButton{
|
||||||
0: MouseButton0, // Left
|
0: MouseButton0, // Left
|
||||||
1: MouseButton2, // Middle
|
1: MouseButton1, // Middle
|
||||||
2: MouseButton1, // Right
|
2: MouseButton2, // Right
|
||||||
3: MouseButton3,
|
3: MouseButton3,
|
||||||
4: MouseButton4,
|
4: MouseButton4,
|
||||||
}
|
}
|
||||||
|
@ -24,8 +24,8 @@ type MouseButton = ui.MouseButton
|
|||||||
// MouseButtons
|
// MouseButtons
|
||||||
const (
|
const (
|
||||||
MouseButtonLeft MouseButton = MouseButton0
|
MouseButtonLeft MouseButton = MouseButton0
|
||||||
MouseButtonRight MouseButton = MouseButton1
|
MouseButtonMiddle MouseButton = MouseButton1
|
||||||
MouseButtonMiddle MouseButton = MouseButton2
|
MouseButtonRight MouseButton = MouseButton2
|
||||||
|
|
||||||
MouseButton0 MouseButton = ui.MouseButton0
|
MouseButton0 MouseButton = ui.MouseButton0
|
||||||
MouseButton1 MouseButton = ui.MouseButton1
|
MouseButton1 MouseButton = ui.MouseButton1
|
||||||
|
Loading…
Reference in New Issue
Block a user