21 lines
295 B
C
21 lines
295 B
C
|
#pragma once
|
||
|
|
||
|
#include <map>
|
||
|
|
||
|
namespace Gedeng {
|
||
|
|
||
|
class Input {
|
||
|
|
||
|
public:
|
||
|
inline static std::map<int, bool> keys_down;
|
||
|
|
||
|
static void set_key_down(int key, bool down) {
|
||
|
keys_down[key] = down;
|
||
|
}
|
||
|
|
||
|
static bool is_key_down(int key) {
|
||
|
return keys_down[key];
|
||
|
}
|
||
|
};
|
||
|
|
||
|
}
|