mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Renamed love.mouse.setGrab to love.mouse.setGrabbed (resolves issue #720)
This commit is contained in:
@@ -68,7 +68,7 @@ public:
|
||||
virtual void setVisible(bool visible) = 0;
|
||||
virtual bool isDown(Button *buttonlist) const = 0;
|
||||
virtual bool isVisible() const = 0;
|
||||
virtual void setGrab(bool grab) = 0;
|
||||
virtual void setGrabbed(bool grab) = 0;
|
||||
virtual bool isGrabbed() const = 0;
|
||||
|
||||
static bool getConstant(const char *in, Button &out);
|
||||
|
||||
@@ -146,7 +146,7 @@ bool Mouse::isVisible() const
|
||||
return SDL_ShowCursor(SDL_QUERY) == SDL_ENABLE;
|
||||
}
|
||||
|
||||
void Mouse::setGrab(bool grab)
|
||||
void Mouse::setGrabbed(bool grab)
|
||||
{
|
||||
love::window::Window *window = love::window::sdl::Window::getSingleton();
|
||||
if (window)
|
||||
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
void setVisible(bool visible);
|
||||
bool isDown(Button *buttonlist) const;
|
||||
bool isVisible() const;
|
||||
void setGrab(bool grab);
|
||||
void setGrabbed(bool grab);
|
||||
bool isGrabbed() const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -179,10 +179,10 @@ int w_isVisible(lua_State *L)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int w_setGrab(lua_State *L)
|
||||
int w_setGrabbed(lua_State *L)
|
||||
{
|
||||
bool b = luax_toboolean(L, 1);
|
||||
instance->setGrab(b);
|
||||
instance->setGrabbed(b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ static const luaL_Reg functions[] =
|
||||
{ "setVisible", w_setVisible },
|
||||
{ "isVisible", w_isVisible },
|
||||
{ "getPosition", w_getPosition },
|
||||
{ "setGrab", w_setGrab },
|
||||
{ "setGrabbed", w_setGrabbed },
|
||||
{ "isGrabbed", w_isGrabbed },
|
||||
{ 0, 0 }
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@ int w_setPosition(lua_State *L);
|
||||
int w_isDown(lua_State *L);
|
||||
int w_setVisible(lua_State *L);
|
||||
int w_isVisible(lua_State *L);
|
||||
int w_setGrap(lua_State *L);
|
||||
int w_setGrabbed(lua_State *L);
|
||||
int w_isGrabbed(lua_State *L);
|
||||
extern "C" LOVE_EXPORT int luaopen_love_mouse(lua_State *L);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user