mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2024-11-18 02:16:23 -05:00
fix right mouse button not triggering input events (#448)
This commit is contained in:
parent
bed386be87
commit
0cef1b0a73
@ -78,7 +78,7 @@ func (im *inputManager) advance(_ float64) error {
|
|||||||
cursorY,
|
cursorY,
|
||||||
}
|
}
|
||||||
|
|
||||||
for key := keyMin; key < keyMax; key++ {
|
for key := keyMin; key <= keyMax; key++ {
|
||||||
if im.inputService.IsKeyJustPressed(key) {
|
if im.inputService.IsKeyJustPressed(key) {
|
||||||
event := KeyEvent{HandlerEvent: eventBase, Key: key}
|
event := KeyEvent{HandlerEvent: eventBase, Key: key}
|
||||||
im.propagate(func(handler Handler) bool {
|
im.propagate(func(handler Handler) bool {
|
||||||
@ -124,7 +124,7 @@ func (im *inputManager) advance(_ float64) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
for button := mouseButtonMin; button < mouseButtonMax; button++ {
|
for button := mouseButtonMin; button <= mouseButtonMax; button++ {
|
||||||
if im.inputService.IsMouseButtonJustPressed(button) {
|
if im.inputService.IsMouseButtonJustPressed(button) {
|
||||||
event := MouseEvent{eventBase, MouseButton(button)}
|
event := MouseEvent{eventBase, MouseButton(button)}
|
||||||
im.propagate(func(handler Handler) bool {
|
im.propagate(func(handler Handler) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user