Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
InputManager.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Engine/api.hpp"
5 
6 #include <ThirdParty/GainInput/lib/include/gainput/gainput.h>
7 #include <ThirdParty/EASTL-master/include/EASTL/vector.h>
8 
9 namespace Engine
10 {
12  {
13  float scrollSpeed = 5;
14  };
15 
20  {
21  public:
26  gainput::InputManager& GetInputManager();
27 
34  eastl::vector<gainput::DeviceButtonId> GetAllKeysDown(gainput::DeviceId deviceId);
35 
40  const gainput::DeviceId& GetMouseId() const;
41 
46  const gainput::DeviceId& GetKeyboardId() const;
47 
52  const gainput::DeviceId& GetGamepadId() const;
53 
58  InputDefaults GetInputDefaults() const;
59  private:
60  gainput::InputManager inputManager;
61  gainput::DeviceId mouseId;
62  gainput::DeviceId keyboardId;
63  gainput::DeviceId gamepadId;
64  InputDefaults inputDefaults;
65 
66  friend class Engine;
67  void Update() noexcept;
68 
69  friend void Window::OnWindowResized(GLFWwindow* window, int width, int height);
70 
71  InputManager() noexcept;
72  InputManager(InputManager const &other) = delete;
73  InputManager(InputManager &&other) noexcept = delete;
74  public:
75  ~InputManager() noexcept = default;
76  private:
77 
78  InputManager &operator=(InputManager const &other) = delete;
79  InputManager &operator=(InputManager &&other) noexcept = delete;
80  };
81 } //namespace Engine
This object stores any information regarding the created GLFW window.
Definition: Window.hpp:28
#define ENGINE_API
Definition: api.hpp:25
This object is a simple wrapper class regarding gainput. It also sends information to ImGUI to keep t...
void Update() noexcept
The general update method of the entire engine system. Call this from your main loop.
Definition: engine.cpp:137