From d75571be93b99fb59ecaa7e0101d5cfe0b7b64a2 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 10 Sep 2019 20:59:19 +0200 Subject: [PATCH] lua_cc_text.cpp: use 'text_mode' instead 'mode' in api Prevent possible ambiguity of text mode parameter. Parameter 'mode' deprecated, but still available for downward compatibility. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d0eab5782c76d6bba843d870463fe1acffd29fff Author: Thilo Graf Date: 2019-09-10 (Tue, 10 Sep 2019) --- src/gui/lua/lua_api_version.h | 2 +- src/gui/lua/lua_cc_text.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index c7f79df4a..3c63755d4 100644 --- a/src/gui/lua/lua_api_version.h +++ b/src/gui/lua/lua_api_version.h @@ -4,4 +4,4 @@ * to luainstance.h changes */ #define LUA_API_VERSION_MAJOR 1 -#define LUA_API_VERSION_MINOR 81 +#define LUA_API_VERSION_MINOR 82 diff --git a/src/gui/lua/lua_cc_text.cpp b/src/gui/lua/lua_cc_text.cpp index 3e2158e52..91a4099a0 100644 --- a/src/gui/lua/lua_cc_text.cpp +++ b/src/gui/lua/lua_cc_text.cpp @@ -95,7 +95,9 @@ int CLuaInstCCText::CCTextNew(lua_State *L) tableLookup(L, "dx", dx); tableLookup(L, "dy", dy); tableLookup(L, "text", text); - tableLookup(L, "mode", tmpMode); + //to prevent possible ambiguity of text mode, use 'text_mode' instead 'mode' in api + tableLookup(L, "text_mode", tmpMode); + tableLookup(L, "mode", tmpMode); //NOTE: parameter 'mode' deprecated, but still available for downward compatibility tableLookup(L, "font_text", font_text); if (font_text >= SNeutrinoSettings::FONT_TYPE_COUNT || font_text < 0) font_text = SNeutrinoSettings::FONT_TYPE_MENU;