mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
input.add_callback
This commit is contained in:
parent
92f6fd2226
commit
ba885e4e08
7 changed files with 66 additions and 6 deletions
|
|
@ -85,6 +85,7 @@ void Events::pollEvents() {
|
|||
if (!binding.state) {
|
||||
binding.state = true;
|
||||
binding.justChange = true;
|
||||
binding.onactived.notify();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
@ -105,7 +106,7 @@ void Events::bind(std::string name, inputtype type, mousecode code) {
|
|||
}
|
||||
|
||||
void Events::bind(std::string name, inputtype type, int code) {
|
||||
bindings[name] = { type, code, false, false };
|
||||
bindings[name] = Binding(type, code);
|
||||
}
|
||||
|
||||
bool Events::active(std::string name) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue