diff options
Diffstat (limited to 'src/lua/modules')
-rw-r--r-- | src/lua/modules/event/event.cpp | 2 | ||||
-rw-r--r-- | src/lua/modules/graphics/graphics.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lua/modules/event/event.cpp b/src/lua/modules/event/event.cpp index be54cf4..71b4a33 100644 --- a/src/lua/modules/event/event.cpp +++ b/src/lua/modules/event/event.cpp @@ -36,7 +36,7 @@ namespace lua case EventType::KEY_DOWN: case EventType::KEY_UP: - luax_setfieldstring(L, "type", EventType::KEY_DOWN ? "KeyDown" : "KeyUp"); + luax_setfieldstring(L, "type", e.type == EventType::KEY_DOWN ? "KeyDown" : "KeyUp"); luax_setfieldstring(L, "key", getKeyName(e.key.keysym.sym)); break; diff --git a/src/lua/modules/graphics/graphics.cpp b/src/lua/modules/graphics/graphics.cpp index d374f51..679b820 100644 --- a/src/lua/modules/graphics/graphics.cpp +++ b/src/lua/modules/graphics/graphics.cpp @@ -260,7 +260,7 @@ namespace lua return 0; } - static int l_palette(lua_State * L) + static int l_getColor(lua_State * L) { luax_pushnumber(L, context.curRenderColor.r); luax_pushnumber(L, context.curRenderColor.g); @@ -541,7 +541,7 @@ namespace lua { "clear", l_clear }, { "draw", l_draw }, { "setColor", l_setColor }, - { "palette", l_palette }, + { "getColor", l_getColor }, { "present", l_present }, /* font */ { "box", l_box }, |