mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
add input.add_callback("key:...") support
This commit is contained in:
parent
5e76cdfadc
commit
96577ee041
4 changed files with 46 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ public:
|
|||
static std::vector<uint> codepoints;
|
||||
static std::vector<keycode> pressedKeys;
|
||||
static std::unordered_map<std::string, Binding> bindings;
|
||||
static std::unordered_map<keycode, util::RunnablesList> keyCallbacks;
|
||||
|
||||
static void pollEvents();
|
||||
|
||||
|
|
@ -50,6 +51,8 @@ public:
|
|||
static bool active(const std::string& name);
|
||||
static bool jactive(const std::string& name);
|
||||
|
||||
static observer_handler addKeyCallback(keycode key, runnable callback);
|
||||
|
||||
static void setKey(int key, bool b);
|
||||
static void setButton(int button, bool b);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue