mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
It's now possible to build each module individually (as a DLL).
This commit is contained in:
@@ -104,6 +104,17 @@ namespace sdl
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
// List of constants.
|
||||
static const LuaConstant wrap_Mouse_constants[] = {
|
||||
{ "mouse_left", Mouse::MOUSE_LEFT },
|
||||
{ "mouse_middle", Mouse::MOUSE_MIDDLE },
|
||||
{ "mouse_right", Mouse::MOUSE_RIGHT },
|
||||
{ "mouse_wheelup", Mouse::MOUSE_WHEELUP },
|
||||
{ "mouse_wheeldown", Mouse::MOUSE_WHEELDOWN },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
|
||||
int wrap_Mouse_open(lua_State * L)
|
||||
{
|
||||
if(instance == 0)
|
||||
@@ -120,10 +131,14 @@ namespace sdl
|
||||
|
||||
luax_register_gc(L, "love.mouse", instance);
|
||||
|
||||
return luax_register_module(L, wrap_Mouse_functions, 0, "mouse");
|
||||
return luax_register_module(L, wrap_Mouse_functions, 0, wrap_Mouse_constants, "mouse");
|
||||
}
|
||||
|
||||
|
||||
} // sdl
|
||||
} // mouse
|
||||
} // love
|
||||
|
||||
int luaopen_love_mouse(lua_State * L)
|
||||
{
|
||||
return love::mouse::sdl::wrap_Mouse_open(L);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define LOVE_MOUSE_SDL_WRAP_MOUSE_H
|
||||
|
||||
// LOVE
|
||||
#include <common/config.h>
|
||||
#include "Mouse.h"
|
||||
|
||||
namespace love
|
||||
@@ -45,4 +46,7 @@ namespace sdl
|
||||
} // mouse
|
||||
} // love
|
||||
|
||||
extern "C" LOVE_EXPORT int luaopen_love_mouse(lua_State * L);
|
||||
|
||||
#endif // LOVE_MOUSE_SDL_WRAP_MOUSE_H
|
||||
|
||||
|
||||
Reference in New Issue
Block a user