feat(lwjgl3): split keyboard input to raw input and text input. Returns MouseDevice#getPosition#24
Conversation
correct compile errors for LibGDXKeyboard
skaldarnar
left a comment
There was a problem hiding this comment.
Overall looks good to me. Seemed to work fine when tested with MovingBlocks/Terasology#3969
| Vector2i getPosition(); | ||
|
|
||
| /** | ||
| * @return The change in mouse position over the last update | ||
| */ | ||
| Vector2i getDelta(); | ||
| Vector2d getDelta(); |
There was a problem hiding this comment.
(probably unrelated to this change) Should these getters return the modifiable vectors or the constant interfaces instead?
| */ | ||
| boolean isButtonDown(int button); | ||
|
|
||
| void update(); |
There was a problem hiding this comment.
Where does this come from? When is it called? Can we add some JavaDoc here, please?
|
|
||
| keyboardActionQueue.add(new KeyboardAction(lastKey, ButtonState.DOWN, character)); | ||
| keyboardActionQueue.add(new KeyboardAction(lastKey, ButtonState.UP, character)); | ||
| keyboardCharQueue.add(new CharKeyboardAction(character)); |
There was a problem hiding this comment.
What has changed here? Did you we do some kind of key code escaping before which is now obsolete because raw input and char input have been split up?
There was a problem hiding this comment.
yeah. KeyUp and KeyDown moved into RawKeyboard.
need some investigate for LibGDX. ( nui v1.0 not used by and LibGDX's game :) )
| * Handle raw input events. Raw keys, case-independency, keyboard layout indepencency. | ||
| * Use this method for handle actions like "Press X to Win" or "Hold X key to Win" | ||
| * If you needs to fill text field, or send chat, use {@link UIWidget#onCharEvent(NUICharEvent)} instead. |
There was a problem hiding this comment.
👍 Thanks a lot, these comments help!
Reintegrate changes from lwjgl3 applied to non extracted TeraNui.
See MovingBlocks/Terasology#3969
This PR breaks Mouse and Keyboard interfaces.
updatemethod (for polling mouse position and calculate delta in LWJGL3 implementation).