mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
And some more.
This commit is contained in:
@@ -68,27 +68,6 @@ int w_setTextInput(lua_State *L)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
static int throwExcept(lua_State *L, const T& func)
|
|
||||||
{
|
|
||||||
bool should_error = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
func();
|
|
||||||
}
|
|
||||||
catch (love::Exception &e)
|
|
||||||
{
|
|
||||||
should_error = true;
|
|
||||||
lua_pushstring(L, e.what());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (should_error)
|
|
||||||
return luaL_error(L, lua_tostring(L, -1));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int w_hasTextInput(lua_State *L)
|
int w_hasTextInput(lua_State *L)
|
||||||
{
|
{
|
||||||
luax_pushboolean(L, instance->hasTextInput());
|
luax_pushboolean(L, instance->hasTextInput());
|
||||||
|
|||||||
Reference in New Issue
Block a user