HatchitGame
ht_glfwkeyboard.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_keyboard.h>
19 #include <map>
20 
21 namespace Hatchit
22 {
23  namespace Game
24  {
25  class HT_API GLFWKeyboard : public IKeyboard
26  {
27  typedef std::map<int, bool> KeyState;
28  public:
29  GLFWKeyboard();
30 
31  void RegisterKeyDown(int code);
32  void RegisterKeyUp(int code);
33 
34 
35  bool VKeyPress(IKeyboard::Key k) override;
36  bool VKeyRelease(IKeyboard::Key k) override;
37  bool VSingleKeyPress(IKeyboard::Key k) override;
38  void VUpdate() override;
39 
40  private:
41  KeyState m_current;
42  KeyState m_previous;
43 
44  int ConvertFromKey(IKeyboard::Key k);
45  };
46  }
47 }
Definition: ht_keyboard.h:23
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
Definition: ht_glfwkeyboard.h:25