diff --git a/src/gui/luainstance.cpp b/src/gui/luainstance.cpp index 1ebd62a12..31871e117 100644 --- a/src/gui/luainstance.cpp +++ b/src/gui/luainstance.cpp @@ -1319,8 +1319,10 @@ void CLuaInstance::CWindowRegister(lua_State *L) { "hide", CLuaInstance::CWindowHide }, { "setCaption", CLuaInstance::CWindowSetCaption }, { "paintHeader", CLuaInstance::CWindowPaintHeader }, - { "header_height", CLuaInstance::CWindowGetHeaderHeight }, - { "footer_height", CLuaInstance::CWindowGetFooterHeight }, + { "headerHeight", CLuaInstance::CWindowGetHeaderHeight }, + { "footerHeight", CLuaInstance::CWindowGetFooterHeight }, + { "header_height", CLuaInstance::CWindowGetHeaderHeight_dep }, /* function 'header_height' is deprecated */ + { "footer_height", CLuaInstance::CWindowGetFooterHeight_dep }, /* function 'footer_height' is deprecated */ { "__gc", CLuaInstance::CWindowDelete }, { NULL, NULL } }; @@ -1455,6 +1457,20 @@ int CLuaInstance::CWindowPaintHeader(lua_State *L) return 0; } +// function 'header_height' is deprecated +int CLuaInstance::CWindowGetHeaderHeight_dep(lua_State *L) +{ + functionDeprecated(L, "header_height", "headerHeight"); + return CWindowGetHeaderHeight(L); +} + +// function 'footer_height' is deprecated +int CLuaInstance::CWindowGetFooterHeight_dep(lua_State *L) +{ + functionDeprecated(L, "footer_height", "footerHeight"); + return CWindowGetFooterHeight(L); +} + int CLuaInstance::CWindowGetHeaderHeight(lua_State *L) { CLuaCWindow *m = CWindowCheck(L, 1); diff --git a/src/gui/luainstance.h b/src/gui/luainstance.h index da2703ffb..245a74459 100644 --- a/src/gui/luainstance.h +++ b/src/gui/luainstance.h @@ -215,6 +215,8 @@ private: static int CWindowPaintHeader(lua_State *L); static int CWindowGetHeaderHeight(lua_State *L); static int CWindowGetFooterHeight(lua_State *L); + static int CWindowGetHeaderHeight_dep(lua_State *L); // function 'header_height' is deprecated + static int CWindowGetFooterHeight_dep(lua_State *L); // function 'footer_height' is deprecated static int CWindowDelete(lua_State *L); static CLuaSignalBox *SignalBoxCheck(lua_State *L, int n);