Rename love.mouse.hasCursor to isCursorSupported (resolves issue #1309).

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-08-05 16:53:27 -03:00
parent f0c682d50d
commit 254e50dbfe
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ public:
virtual Cursor *getCursor() const = 0;
virtual bool hasCursor() const = 0;
virtual bool isCursorSupported() const = 0;
virtual double getX() const = 0;
virtual double getY() const = 0;
+1 -1
View File
@@ -107,7 +107,7 @@ love::mouse::Cursor *Mouse::getCursor() const
}
bool Mouse::hasCursor() const
bool Mouse::isCursorSupported() const
{
return SDL_GetDefaultCursor() != nullptr;
}
+1 -1
View File
@@ -53,7 +53,7 @@ public:
love::mouse::Cursor *getCursor() const override;
bool hasCursor() const override;
bool isCursorSupported() const override;
double getX() const override;
double getY() const override;
+3 -3
View File
@@ -92,9 +92,9 @@ int w_getCursor(lua_State *L)
return 1;
}
int w_hasCursor(lua_State *L)
int w_isCursorSupported(lua_State *L)
{
luax_pushboolean(L, instance()->hasCursor());
luax_pushboolean(L, instance()->isCursorSupported());
return 1;
}
@@ -214,7 +214,7 @@ static const luaL_Reg functions[] =
{ "getSystemCursor", w_getSystemCursor },
{ "setCursor", w_setCursor },
{ "getCursor", w_getCursor },
{ "hasCursor", w_hasCursor },
{ "isCursorSupported", w_isCursorSupported },
{ "getX", w_getX },
{ "getY", w_getY },
{ "setX", w_setX },
+1 -1
View File
@@ -623,7 +623,7 @@ function love.errhand(msg)
love.mouse.setVisible(true)
love.mouse.setGrabbed(false)
love.mouse.setRelativeMode(false)
if love.mouse.hasCursor() then
if love.mouse.isCursorSupported() then
love.mouse.setCursor()
end
end
+3 -2
View File
@@ -1141,8 +1141,9 @@ const unsigned char boot_lua[] =
0x61, 0x62, 0x62, 0x65, 0x64, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x52, 0x65,
0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x68, 0x61,
0x73, 0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x69, 0x73,
0x43, 0x75, 0x72, 0x73, 0x6f, 0x72, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x28, 0x29, 0x20,
0x74, 0x68, 0x65, 0x6e, 0x0a,
0x09, 0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x43,
0x75, 0x72, 0x73, 0x6f, 0x72, 0x28, 0x29, 0x0a,
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,