mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
fix lua stack manipulations
This commit is contained in:
parent
13de581b4b
commit
e7555448cf
3 changed files with 39 additions and 24 deletions
|
|
@ -40,6 +40,7 @@ static int l_add_callback(lua::State* L) {
|
|||
throw std::runtime_error("on_hud_open is not called yet");
|
||||
}
|
||||
auto key = input_util::keycode_from(bindname.substr(pos + 1));
|
||||
lua::pushvalue(L, 2);
|
||||
auto callback = lua::create_simple_handler(L);
|
||||
hud->keepAlive(Events::keyCallbacks[key].add(callback));
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue