refactor: reduce Window references

This commit is contained in:
MihailRis
2025-04-02 14:55:53 +03:00
parent 896ab3597a
commit 74a94f869c
19 changed files with 151 additions and 155 deletions
-1
View File
@@ -18,7 +18,6 @@
#include "util/listutil.hpp"
#include "util/platform.hpp"
#include "window/Events.hpp"
#include "window/Window.hpp"
#include "world/Level.hpp"
#include "world/generator/WorldGenerator.hpp"
+1 -1
View File
@@ -42,7 +42,7 @@ static int l_add_callback(lua::State* L) {
std::string prefix = bindname.substr(0, pos);
if (prefix == "key") {
auto key = input_util::keycode_from(bindname.substr(pos + 1));
handler = Events::keyCallbacks[key].add(actual_callback);
handler = Events::addKeyCallback(key, actual_callback);
}
}
auto callback = [=]() -> bool {