1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-11 02:10:43 +00:00

fix right mouse button not triggering input events (#448)

This commit is contained in:
David Carrell 2020-06-24 23:36:27 -05:00 committed by GitHub
parent bed386be87
commit 0cef1b0a73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,7 +78,7 @@ func (im *inputManager) advance(_ float64) error {
cursorY,
}
for key := keyMin; key < keyMax; key++ {
for key := keyMin; key <= keyMax; key++ {
if im.inputService.IsKeyJustPressed(key) {
event := KeyEvent{HandlerEvent: eventBase, Key: key}
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) {
event := MouseEvent{eventBase, MouseButton(button)}
im.propagate(func(handler Handler) bool {