mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Renamed love.touch.getTouchIDs to love.touch.getIDs.
--HG-- branch : minor
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
/**
|
||||
* Gets a list of the IDs of all currently active touches.
|
||||
**/
|
||||
virtual std::vector<int64> getTouchIDs() const = 0;
|
||||
virtual std::vector<int64> getIDs() const = 0;
|
||||
|
||||
/**
|
||||
* Gets the position in pixels of a specific touch, using its ID.
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace touch
|
||||
namespace sdl
|
||||
{
|
||||
|
||||
std::vector<int64> Touch::getTouchIDs() const
|
||||
std::vector<int64> Touch::getIDs() const
|
||||
{
|
||||
std::vector<int64> ids;
|
||||
ids.reserve(touches.size());
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
virtual ~Touch() {}
|
||||
|
||||
virtual std::vector<int64> getTouchIDs() const;
|
||||
virtual std::vector<int64> getIDs() const;
|
||||
virtual void getPosition(int64 id, double &x, double &y) const;
|
||||
|
||||
// Implements Module.
|
||||
|
||||
@@ -33,9 +33,9 @@ namespace touch
|
||||
|
||||
#define instance() (Module::getInstance<Touch>(Module::M_TOUCH))
|
||||
|
||||
int w_getTouchIDs(lua_State *L)
|
||||
int w_getIDs(lua_State *L)
|
||||
{
|
||||
std::vector<int64> ids = instance()->getTouchIDs();
|
||||
std::vector<int64> ids = instance()->getIDs();
|
||||
|
||||
lua_createtable(L, (int) ids.size(), 0);
|
||||
|
||||
@@ -72,7 +72,7 @@ int w_getPosition(lua_State *L)
|
||||
|
||||
static const luaL_Reg functions[] =
|
||||
{
|
||||
{ "getTouchIDs", w_getTouchIDs },
|
||||
{ "getIDs", w_getIDs },
|
||||
{ "getPosition", w_getPosition },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace love
|
||||
namespace touch
|
||||
{
|
||||
|
||||
int w_getTouchIDs(lua_State *L);
|
||||
int w_getIDs(lua_State *L);
|
||||
int w_getPosition(lua_State *L);
|
||||
extern "C" LOVE_EXPORT int luaopen_love_touch(lua_State *L);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user