mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
lua: hud library
This commit is contained in:
parent
ffed4319da
commit
7e553efdec
14 changed files with 140 additions and 31 deletions
16
src/logic/scripting/scripting_frontend.cpp
Normal file
16
src/logic/scripting/scripting_frontend.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#include "scripting_frontend.h"
|
||||
#include "scripting.h"
|
||||
|
||||
#include "api/libhud.h"
|
||||
#include "LuaState.h"
|
||||
|
||||
namespace scripting {
|
||||
extern lua::LuaState* state;
|
||||
}
|
||||
|
||||
Hud* scripting::hud = nullptr;
|
||||
|
||||
void scripting::on_frontend_init(Hud* hud) {
|
||||
scripting::hud = hud;
|
||||
scripting::state->openlib("hud", hudlib, 0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue