mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add 'onselect' callback & remove 'default' tag
This commit is contained in:
parent
47f7259c72
commit
f17167f8c9
6 changed files with 60 additions and 19 deletions
|
|
@ -69,6 +69,17 @@ wstringconsumer scripting::create_wstring_consumer(
|
|||
};
|
||||
}
|
||||
|
||||
stringconsumer scripting::create_string_consumer(
|
||||
const scriptenv& env, const std::string& src, const std::string& file
|
||||
) {
|
||||
return [=](const std::string& x) {
|
||||
if (auto L = process_callback(env, src, file)) {
|
||||
lua::pushstring(L, x);
|
||||
lua::call_nothrow(L, 1);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
wstringsupplier scripting::create_wstring_supplier(
|
||||
const scriptenv& env, const std::string& src, const std::string& file
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue