arthurBricq / crafty

Multiplayer Minecraft clone in pure Rust with OpenGL
4 stars 0 forks source link

Rework the key and mouse event handler #16

Closed arnaudlorin closed 15 hours ago

arnaudlorin commented 2 weeks ago

Is your feature request related to a problem? Please describe. Destructing a block is right click Placing a block is not working at all Sometime when going up,down,left,right, camera still continue even though the key is unpressed Problem most probably related to windows

Describe the solution you'd like The binding between mouse click and ButtonId value seems to not be universal through os and computer so a rework is necessary to take that into account Similarly for key, if I recall correctly, windows handle them differently (something like send an event when key is pressed AND unpressed maybe)

Tested on commit c0c8498c64ec9115d89735a5df294a5b3c058c6b

arthurBricq commented 2 weeks ago

What do you mean placing cubes doesnt work ? It actually never works ? That's sad ...

On Ubuntu it works, so I guess it is related to different kind of events handling.

arnaudlorin commented 2 weeks ago

Yes exactly I find how to do it after trying all the buttons on my mouse. The value of ButtonId is not the same depending on the OS