mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Event queue
This commit is contained in:
parent
f8e02e1b3b
commit
fcb420c4c7
7 changed files with 131 additions and 80 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include "../../delegates.h"
|
||||
|
||||
#include "lua/LuaState.h"
|
||||
#include "scripting_functional.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
|
@ -44,6 +45,9 @@ namespace scripting {
|
|||
|
||||
extern bool register_event(int env, const std::string& name, const std::string& id);
|
||||
|
||||
static int noargs(lua::LuaState *) { return 0; }
|
||||
extern bool emit_event(const std::string& name, std::function<int(lua::LuaState* state)> args = noargs);
|
||||
|
||||
std::unique_ptr<Environment> create_environment(int parent=0);
|
||||
std::unique_ptr<Environment> create_pack_environment(const ContentPack& pack);
|
||||
std::unique_ptr<Environment> create_doc_environment(int parent, const std::string& name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue