Brunot
Loading...
Searching...
No Matches
Input.cpp File Reference

System responsible for handling inputs across Mouse, Keys, and Controllers. More...

#include "Input.h"
#include <utility>
#include "Messaging.h"
#include "imgui.h"
#include "Component/Button.h"
#include "Utility/Messages/KeyPressedMessage.h"
Include dependency graph for Input.cpp:

Namespaces

namespace  sys
 the type of elements in a basic_json container

Detailed Description

System responsible for handling inputs across Mouse, Keys, and Controllers.

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 one inputting device. 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

Date
2026 / 04 / 29