|
Brunot
|
System responsible for handling inputs and sending messages when they occur. More...
#include "System/opengl.h"#include "Logging.h"#include "Utility/Math/Vector4D.h"#include "Framework/Keys.h"#include "Framework/Controllers.h"#include "Framework/Mouse.h"Go to the source code of this file.
Classes | |
| class | sys::Input |
| System responsible for handling inputs and sending messages when they occur. More... | |
Namespaces | |
| namespace | sys |
| the type of elements in a basic_json container | |
System responsible for handling inputs and sending messages when they occur.
Delegates work across Mouse, Keys, and Controllers for their corresponding input methods.
When an input is broadcast, it sends a KeyPressedMessage, which contains an ID indicating the ID of the inputting device. This ID is used to make sure certain classes (namely FilteredSelector) can only receive inputs from specific inputting devices. Controllers are naturally given an ID from 0-15 by glfw, but Mouse and Keys are not, and thus the decision is arbitrary. So, for our engine, we follow this convention: Mouse input has an ID of -2, Key input has an ID of -1, and Controllers have IDs from 0-15
Author(s): Bryley Elder (bryle.nosp@m.y.el.nosp@m.der@d.nosp@m.igip.nosp@m.en.ed.nosp@m.u) Base Implementation Ori Balashov (ori.b.nosp@m.alas.nosp@m.hov@d.nosp@m.igip.nosp@m.en.ed.nosp@m.u) Refactoring and additions