mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
fix 'mouse:' input prefix is not available
This commit is contained in:
parent
99a62710b8
commit
cf35023adf
6 changed files with 18 additions and 7 deletions
|
|
@ -216,10 +216,17 @@ public:
|
|||
return bindings;
|
||||
}
|
||||
|
||||
ObserverHandler addKeyCallback(Keycode key, KeyCallback callback) override {
|
||||
ObserverHandler addKeyCallback(Keycode key, InputCallback callback) override {
|
||||
return keyCallbacks[key].add(std::move(callback));
|
||||
}
|
||||
|
||||
ObserverHandler addMouseCallback(Mousecode button, InputCallback callback) override {
|
||||
return addKeyCallback(
|
||||
static_cast<Keycode>(MOUSE_KEYS_OFFSET + static_cast<int>(button)),
|
||||
std::move(callback)
|
||||
);
|
||||
}
|
||||
|
||||
const std::vector<Keycode>& getPressedKeys() const override {
|
||||
return pressedKeys;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue