input.add_callback

This commit is contained in:
MihailRis
2024-05-05 06:49:17 +03:00
parent 92f6fd2226
commit ba885e4e08
7 changed files with 66 additions and 6 deletions
+2 -1
View File
@@ -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) {