Added love.focus callback

This commit is contained in:
Bart van Strien
2010-08-03 13:51:19 +02:00
parent 93910940da
commit 5235ceac53
7 changed files with 990 additions and 957 deletions
+6
View File
@@ -64,6 +64,9 @@ namespace sdl
msg.joystick.index = luaL_checkint(L, 2);
msg.joystick.button = luaL_checkint(L, 3);
return true;
case Event::TYPE_FOCUS:
msg.focus.f = lua_toboolean(L, 2);
return true;
case Event::TYPE_QUIT:
return true;
default:
@@ -108,6 +111,9 @@ namespace sdl
lua_pushinteger(L, msg.joystick.index);
lua_pushinteger(L, msg.joystick.button);
return 3;
case Event::TYPE_FOCUS:
lua_pushboolean(L, msg.focus.f);
return 2;
case Event::TYPE_QUIT:
return 1;
default: