mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
scripting.h fix + input library
This commit is contained in:
parent
f9dd865bee
commit
f02edcf15a
12 changed files with 121 additions and 34 deletions
|
|
@ -25,7 +25,7 @@ void scripting::on_frontend_init(Hud* hud) {
|
|||
scripting::state->openlib("hud", hudlib, 0);
|
||||
|
||||
for (auto& pack : scripting::engine->getContentPacks()) {
|
||||
emit_event(pack.id + ".hudopen", [&] (lua::LuaState* state) {
|
||||
state->emit_event(pack.id + ".hudopen", [&] (lua::LuaState* state) {
|
||||
state->pushinteger(hud->getPlayer()->getId());
|
||||
return 1;
|
||||
});
|
||||
|
|
@ -34,7 +34,7 @@ void scripting::on_frontend_init(Hud* hud) {
|
|||
|
||||
void scripting::on_frontend_close() {
|
||||
for (auto& pack : scripting::engine->getContentPacks()) {
|
||||
emit_event(pack.id + ".hudclose", [&] (lua::LuaState* state) {
|
||||
state->emit_event(pack.id + ".hudclose", [&] (lua::LuaState* state) {
|
||||
state->pushinteger(hud->getPlayer()->getId());
|
||||
return 1;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue