Inaccurate interpretation of key states
v2
Onyx's interpretation of key states is inaccurate. There are only three key callback actions: press, release, and repeat. Onyx uses these callbacks to create different key querying functions, where the user can query if a key is pressed (will return true while key is down until key is considered repeating), tapped (will return true only in the same frame the key was pressed), repeated (will return true while key is pressed after the delay required for a key to be considered repeating), or down (pressed or repeated). The terminology is flawed here, though. When I created the input handler, I did not realize that only one key can be repeated at a time, so if multiple keys are pressed at the same time, only the last one to be pressed will be considered repeating, the others will remain 'pressed,' which makes all the logic fall apart and not make sense anymore, so needless to say it needs to be redone. And all of this is true regarding mouse buttons as well.
SO - the structure of key / mouse button states and queries will be redone for Onyx 2.0!
0 条评论