bidrag
A rust library for managing bindable game input. Currently only KB/M, but will have support for joysticks in the future.
Example (Using GLFW):
let mut glfw = init.expect;
let = ;
let mut cursorMode = Disabled; // For mouse input
window.set_cursor_pos_polling;
window.set_cursor_mode;
window.set_key_polling;
window.make_current;
let mut inputSub = new;
// Axes are referred to by indices, rather than using a string lookup every time.
let yawIndex = inputSub.add_binding;
let quitIndex = inputSub.add_binding;
let mut running = true;
while running
TODO:
- Joysticks
- (Possibly) multiple KB/M.
-
- At the very least, the library can support it and leave it up to the client