mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-03 21:46:20 +00:00
[lua] Add KeyEvent.repeatCount (fix aseprite/api#95)
As "repeat" is a keyword on Lua, it makes things complicated.
This commit is contained in:
parent
87251e52be
commit
b7770f5fac
@ -1016,7 +1016,10 @@ static void fill_keymessage_values(lua_State* L, const ui::KeyMessage* msg)
|
||||
|
||||
// KeyMessage specifics
|
||||
lua_pushinteger(L, msg->repeat());
|
||||
lua_setfield(L, -2, "repeat");
|
||||
lua_setfield(L, -2, "repeat"); // Only for backward compatibility, remove this in a future
|
||||
|
||||
lua_pushinteger(L, msg->repeat());
|
||||
lua_setfield(L, -2, "repeatCount");
|
||||
|
||||
// TODO improve this (create an Event metatable)
|
||||
lua_pushcfunction(L, [](lua_State*) -> int {
|
||||
|
Loading…
Reference in New Issue
Block a user