mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
toml parser update + 'toml' module is built-in now
This commit is contained in:
parent
ffdeac5c1f
commit
c94d40ab02
15 changed files with 252 additions and 178 deletions
|
|
@ -20,13 +20,13 @@ namespace scripting {
|
|||
using namespace scripting;
|
||||
|
||||
static int l_keycode(lua_State* L) {
|
||||
const char* name = lua_tostring(L, 1);
|
||||
const char* name = state->requireString(1);
|
||||
lua_pushinteger(L, static_cast<int>(input_util::keycode_from(name)));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int l_add_callback(lua_State* L) {
|
||||
auto bindname = lua_tostring(L, 1);
|
||||
auto bindname = state->requireString(1);
|
||||
const auto& bind = Events::bindings.find(bindname);
|
||||
if (bind == Events::bindings.end()) {
|
||||
throw std::runtime_error("unknown binding "+util::quote(bindname));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue