From 040defbbfecb8f20e31fb87a2df41bd86fd13705 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Wed, 28 Aug 2013 19:13:17 -0300 Subject: [PATCH] Renamed love.mouse.setGrab to love.mouse.setGrabbed (resolves issue #720) --- src/modules/mouse/Mouse.h | 2 +- src/modules/mouse/sdl/Mouse.cpp | 2 +- src/modules/mouse/sdl/Mouse.h | 2 +- src/modules/mouse/wrap_Mouse.cpp | 6 +++--- src/modules/mouse/wrap_Mouse.h | 2 +- src/scripts/boot.lua | 2 +- src/scripts/boot.lua.h | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/modules/mouse/Mouse.h b/src/modules/mouse/Mouse.h index f11492fda..bea4852df 100644 --- a/src/modules/mouse/Mouse.h +++ b/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); diff --git a/src/modules/mouse/sdl/Mouse.cpp b/src/modules/mouse/sdl/Mouse.cpp index 9dceed70b..e0d380c97 100644 --- a/src/modules/mouse/sdl/Mouse.cpp +++ b/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) diff --git a/src/modules/mouse/sdl/Mouse.h b/src/modules/mouse/sdl/Mouse.h index 78d826c87..39cd5c193 100644 --- a/src/modules/mouse/sdl/Mouse.h +++ b/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: diff --git a/src/modules/mouse/wrap_Mouse.cpp b/src/modules/mouse/wrap_Mouse.cpp index f4470c3c1..052243b30 100644 --- a/src/modules/mouse/wrap_Mouse.cpp +++ b/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 } }; diff --git a/src/modules/mouse/wrap_Mouse.h b/src/modules/mouse/wrap_Mouse.h index 5e580c2a8..2360f0956 100644 --- a/src/modules/mouse/wrap_Mouse.h +++ b/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); diff --git a/src/scripts/boot.lua b/src/scripts/boot.lua index 43caf5fd0..429fd2491 100644 --- a/src/scripts/boot.lua +++ b/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() diff --git a/src/scripts/boot.lua.h b/src/scripts/boot.lua.h index 2ed6b1699..27eab4d17 100644 --- a/src/scripts/boot.lua.h +++ b/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,