add input.add_callback("key:...") support
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user