summary refs log tree commit diff stats
path: root/src/input_system.h
blob: c8e0d8c4422c25c93893e668c00e3ba3331cb659 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef INPUT_SYSTEM_H_47764575
#define INPUT_SYSTEM_H_47764575

#include <deque>
#include <string>
#include "system.h"

class Game;

class InputSystem : public System {
public:

  static constexpr SystemKey Key = SystemKey::Input;

  InputSystem(Game& game) : game_(game) {}

  void tick(double dt) override;

  bool isDebugConsoleOpen() const { return debugConsole_; }

  const std::string& getDebugText() const { return debugText_; }

private:

  Game& game_;
  bool debugConsole_ = false;
  std::string debugText_;
  std::deque<std::string> debugHistory_;
  int debugHistorySelection_ = 0;
};

#endif /* end of include guard: INPUT_SYSTEM_H_47764575 */