Browse Source

Renamed love.mouse.setGrab to love.mouse.setGrabbed (resolves issue #720)

Alex Szpakowski 12 years ago
parent
commit
040defbbfe

+ 1 - 1
src/modules/mouse/Mouse.h

@@ -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);

+ 1 - 1
src/modules/mouse/sdl/Mouse.cpp

@@ -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)

+ 1 - 1
src/modules/mouse/sdl/Mouse.h

@@ -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:

+ 3 - 3
src/modules/mouse/wrap_Mouse.cpp

@@ -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 }
 };

+ 1 - 1
src/modules/mouse/wrap_Mouse.h

@@ -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);
 

+ 1 - 1
src/scripts/boot.lua

@@ -1498,7 +1498,7 @@ function love.errhand(msg)
 	-- Load.
 	if love.mouse then
 		love.mouse.setVisible(true)
-		love.mouse.setGrab(false)
+		love.mouse.setGrabbed(false)
 	end
 	if love.audio then love.audio.stop() end
 	love.graphics.reset()

+ 1 - 1
src/scripts/boot.lua.h

@@ -5172,7 +5172,7 @@ const unsigned char boot_lua[] =
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x56, 0x69, 
 	0x73, 0x69, 0x62, 0x6c, 0x65, 0x28, 0x74, 0x72, 0x75, 0x65, 0x29, 0x0a,
 	0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x6d, 0x6f, 0x75, 0x73, 0x65, 0x2e, 0x73, 0x65, 0x74, 0x47, 0x72, 
-	0x61, 0x62, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
+	0x61, 0x62, 0x62, 0x65, 0x64, 0x28, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x29, 0x0a,
 	0x09, 0x65, 0x6e, 0x64, 0x0a,
 	0x09, 0x69, 0x66, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x20, 0x74, 0x68, 0x65, 
 	0x6e, 0x20, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x73, 0x74, 0x6f, 0x70, 0x28,