- Joined
- Sep 30, 2018
- Messages
- 7
- Reaction score
- 4
- First Language
- English
- Primarily Uses
- VNM
Reposting this from the Steam discussion boards for visibility.
There's a bug in VNM's engine-side input handling code that occasionally causes clicks to get lost. In Component_InputHandler.update:
This works as expected. Every left-click gets logged to the console. However, if you also log the button status...
You'll see that something is broken engine-side. Click repeatedly and most of your logs will correctly show [0,2,0,0] in the console. But occasionally you'll see [0,0,0,0] reported even though Input.Mouse.buttonUp was true on the previous line. This causes issues in numerous systems such as hotspots and choice buttons, where the code listening for the "mouseUp" event gets triggered, but when the code checks against Input.Mouse.buttons[Input.Mouse.BUTTON_LEFT] to make sure the correct button was generating the mouseUp, it fails.
There's a bug in VNM's engine-side input handling code that occasionally causes clicks to get lost. In Component_InputHandler.update:
Code:
//...
if Input.Mouse.buttonUp
console.log("click")
gs.GlobalEventManager.emit("mouseUp")
//...
This works as expected. Every left-click gets logged to the console. However, if you also log the button status...
Code:
//...
if Input.Mouse.buttonUp
console.log("click")
console.log(Input.Mouse.buttons)
gs.GlobalEventManager.emit("mouseUp")
//...
You'll see that something is broken engine-side. Click repeatedly and most of your logs will correctly show [0,2,0,0] in the console. But occasionally you'll see [0,0,0,0] reported even though Input.Mouse.buttonUp was true on the previous line. This causes issues in numerous systems such as hotspots and choice buttons, where the code listening for the "mouseUp" event gets triggered, but when the code checks against Input.Mouse.buttons[Input.Mouse.BUTTON_LEFT] to make sure the correct button was generating the mouseUp, it fails.