InputManager.ixx File
InputManager providing access to various input states. More...
Included Headers
#include <memory>
#include <stdexcept>
#include <cassert>
#include <cmath>
#include <helios.util.log.LogManager>
#include <helios.util.log.Logger>
#include <helios.window.Window>
#include <helios.input.types.Key>
#include <helios.input.InputAdapter>
#include <helios.input.gamepad.GamepadState>
#include <helios.input.types.Gamepad>
Namespaces Index
| namespace | helios |
| namespace | input |
|
Input handling and management. More... | |
Classes Index
| class | InputManager |
|
InputManager providing access to various input states. More... | |
Macro Definitions Index
| #define | HELIOS_LOG_SCOPE "helios::input::InputManager" |
Description
InputManager providing access to various input states.
Macro Definitions
HELIOS_LOG_SCOPE
|
Definition at line 22 of file InputManager.ixx.
22#define HELIOS_LOG_SCOPE "helios::input::InputManager"
File Listing
The file content with the documentation metadata removed is:
22#define HELIOS_LOG_SCOPE "helios::input::InputManager"
23export namespace helios::input {
36 class InputManager {
42 const helios::window::Window* observedWin_ = nullptr;
58 inline static const helios::util::log::Logger& logger_ = helios::util::log::LogManager::loggerForScope(HELIOS_LOG_SCOPE);
69 explicit InputManager(std::unique_ptr<helios::input::InputAdapter> input)
70 : input_(std::move(input)) {}
80 void observe(const helios::window::Window& win) noexcept {
92 [[nodiscard]] const helios::window::Window* observedWindow() const {
114 logger_.warn("No window to observe.");
131 [[nodiscard]] bool isKeyPressed(const helios::input::types::Key& key) const noexcept {
133 logger_.warn("No window to observe.");
151 [[nodiscard]] bool isKeyReleased(const helios::input::types::Key& key) const noexcept {
153 logger_.warn("No window to observe.");
171 unsigned int registerGamepads(unsigned int mask) noexcept {
178 logger_.warn("Gamepad mask out of bounds. Clamping to maximum valid value.");
206 [[nodiscard]] const helios::input::gamepad::GamepadState& gamepadState(helios::input::types::Gamepad gamepadId) const noexcept {
217 [[nodiscard]] bool isConnected(helios::input::types::Gamepad gamepadId) const noexcept {
227 [[nodiscard]] const helios::input::InputAdapter& inputAdapter() const noexcept {
239 [[nodiscard]] helios::input::InputAdapter& inputAdapter() noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.