Another Game Engine, by now only use SDL2 and its dependent family library but we planning to use other librarys like SFML or allegro5 to create Drawing Context (opengl ,Vulkan or metal).
0
stars
2
forks
source link
Create enumerations for keyboard and mouse buttons #22
The goal of this issue is to crate enums for keyboards and mouse buttons and maybe you can include joypad buttons as well.
For SDL you could:
Map SDL_Keycode constants values to an enum, in the case of the keyboard
Map **SDLBUTTON*** constants values to another enum, in the case of mouse button press
Map SDL_MouseMotionEvent constants values to an struct, in the case of mouse button press
Map SDL_JoyButtonEvent constants to a enum, in the case of gamepad
Map SDL_JoyAxisEvent values to an struct, in the case of gamepad
Map SDL_JoyDeviceEvent values to an struct, in the case of gamepad
Map SDL_TouchFingerEvent values to an struct, in the case of touchscreen
Additionally, other information about the input device should be sent alongside with the event data, like the device id, to distinguish between devices, for example if you have more than one gamepad plugged in.
Information about these events can be found at the SDL Wiki
DOD
Ideally should have tests and be covered by coverage.
Must have static_assert for every value of the enum
Scope
The goal of this issue is to crate enums for keyboards and mouse buttons and maybe you can include joypad buttons as well.
For SDL you could:
Additionally, other information about the input device should be sent alongside with the event data, like the device id, to distinguish between devices, for example if you have more than one gamepad plugged in.
Information about these events can be found at the SDL Wiki
DOD