mirror of
https://github.com/love2d/love.git
synced 2026-08-14 10:13:46 +02:00
Build type information on first use (load-time), instead of using a hardcoded list
--HG-- branch : dynamiccore2
This commit is contained in:
@@ -28,7 +28,7 @@ namespace mouse
|
||||
|
||||
Cursor *luax_checkcursor(lua_State *L, int idx)
|
||||
{
|
||||
return luax_checktype<Cursor>(L, idx, MOUSE_CURSOR_ID);
|
||||
return luax_checktype<Cursor>(L, idx, Cursor::type);
|
||||
}
|
||||
|
||||
int w_Cursor_getType(lua_State *L)
|
||||
@@ -61,7 +61,7 @@ static const luaL_Reg w_Cursor_functions[] =
|
||||
|
||||
extern "C" int luaopen_cursor(lua_State *L)
|
||||
{
|
||||
return luax_register_type(L, MOUSE_CURSOR_ID, "Cursor", w_Cursor_functions, nullptr);
|
||||
return luax_register_type(L, Cursor::type, "Cursor", w_Cursor_functions, nullptr);
|
||||
}
|
||||
|
||||
} // mouse
|
||||
|
||||
Reference in New Issue
Block a user