mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
Renamed love.window.setCaption to love.window.setTitle (resolves issue #703)
This commit is contained in:
@@ -198,14 +198,14 @@ int w_getIcon(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_setCaption(lua_State *L)
|
int w_setTitle(lua_State *L)
|
||||||
{
|
{
|
||||||
std::string title = luax_checkstring(L, 1);
|
std::string title = luax_checkstring(L, 1);
|
||||||
instance->setWindowTitle(title);
|
instance->setWindowTitle(title);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_getCaption(lua_State *L)
|
int w_getTitle(lua_State *L)
|
||||||
{
|
{
|
||||||
luax_pushstring(L, instance->getWindowTitle());
|
luax_pushstring(L, instance->getWindowTitle());
|
||||||
return 1;
|
return 1;
|
||||||
@@ -242,8 +242,8 @@ static const luaL_Reg functions[] =
|
|||||||
{ "getDimensions", w_getDimensions },
|
{ "getDimensions", w_getDimensions },
|
||||||
{ "setIcon", w_setIcon },
|
{ "setIcon", w_setIcon },
|
||||||
{ "getIcon", w_getIcon },
|
{ "getIcon", w_getIcon },
|
||||||
{ "setCaption", w_setCaption },
|
{ "setTitle", w_setTitle },
|
||||||
{ "getCaption", w_getCaption },
|
{ "getTitle", w_getTitle },
|
||||||
{ "hasFocus", w_hasFocus },
|
{ "hasFocus", w_hasFocus },
|
||||||
{ "hasMouseFocus", w_hasMouseFocus },
|
{ "hasMouseFocus", w_hasMouseFocus },
|
||||||
{ "isVisible", w_isVisible },
|
{ "isVisible", w_isVisible },
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ int w_getHeight(lua_State *L);
|
|||||||
int w_getDimensions(lua_State *L);
|
int w_getDimensions(lua_State *L);
|
||||||
int w_setIcon(lua_State *L);
|
int w_setIcon(lua_State *L);
|
||||||
int w_getIcon(lua_State *L);
|
int w_getIcon(lua_State *L);
|
||||||
int w_setCaption(lua_State *L);
|
int w_setTitle(lua_State *L);
|
||||||
int w_getCaption(lua_State *L);
|
int w_getTitle(lua_State *L);
|
||||||
int w_hasFocus(lua_State *L);
|
int w_hasFocus(lua_State *L);
|
||||||
int w_hasMouseFocus(lua_State *L);
|
int w_hasMouseFocus(lua_State *L);
|
||||||
int w_isVisible(lua_State *L);
|
int w_isVisible(lua_State *L);
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ function love.init()
|
|||||||
else
|
else
|
||||||
error("Could not set window mode")
|
error("Could not set window mode")
|
||||||
end
|
end
|
||||||
love.window.setCaption(c.title)
|
love.window.setTitle(c.window.title or c.title)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Our first timestep, because window creation can take some time
|
-- Our first timestep, because window creation can take some time
|
||||||
|
|||||||
@@ -620,8 +620,9 @@ const unsigned char boot_lua[] =
|
|||||||
0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x22,
|
0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x22,
|
||||||
0x29, 0x0a,
|
0x29, 0x0a,
|
||||||
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 0x65, 0x74, 0x43,
|
0x09, 0x09, 0x6c, 0x6f, 0x76, 0x65, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x73, 0x65, 0x74, 0x54,
|
||||||
0x61, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x63, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x29, 0x0a,
|
0x69, 0x74, 0x6c, 0x65, 0x28, 0x63, 0x2e, 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x2e, 0x74, 0x69, 0x74, 0x6c,
|
||||||
|
0x65, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x2e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x29, 0x0a,
|
||||||
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
0x09, 0x65, 0x6e, 0x64, 0x0a,
|
||||||
0x09, 0x2d, 0x2d, 0x20, 0x4f, 0x75, 0x72, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65,
|
0x09, 0x2d, 0x2d, 0x20, 0x4f, 0x75, 0x72, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65,
|
||||||
0x73, 0x74, 0x65, 0x70, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x77, 0x69, 0x6e, 0x64,
|
0x73, 0x74, 0x65, 0x70, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x77, 0x69, 0x6e, 0x64,
|
||||||
|
|||||||
Reference in New Issue
Block a user