From aab9c8df904f838027619d20921346c8a27fcef1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 9 May 2017 12:08:03 +0200 Subject: [PATCH] CLuaInstCCWindow: fix passed shadow paramater Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1f978f01ad2a14ce69097b34bd1d550523b8f9e9 Author: Thilo Graf Date: 2017-05-09 (Tue, 09 May 2017) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/lua/lua_api_version.h | 2 +- src/gui/lua/lua_cc_window.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/lua/lua_api_version.h b/src/gui/lua/lua_api_version.h index 078e88ef8..1edd9814a 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 73 +#define LUA_API_VERSION_MINOR 74 diff --git a/src/gui/lua/lua_cc_window.cpp b/src/gui/lua/lua_cc_window.cpp index 819fe18d2..8fb985e67 100644 --- a/src/gui/lua/lua_cc_window.cpp +++ b/src/gui/lua/lua_cc_window.cpp @@ -89,12 +89,13 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name); tableLookup(L, "icon", icon); - bool has_shadow = false; + int has_shadow = CC_SHADOW_OFF; if (!tableLookup(L, "has_shadow", has_shadow)) { tmp1 = "false"; if (tableLookup(L, "has_shadow", tmp1)) paramBoolDeprecated(L, tmp1.c_str()); - has_shadow = (tmp1 == "true" || tmp1 == "1" || tmp1 == "yes"); + if ((tmp1 == "true" || tmp1 == "1" || tmp1 == "yes")) + has_shadow = CC_SHADOW_ON; } tableLookup(L, "color_frame" , color_frame); @@ -126,7 +127,7 @@ int CLuaInstCCWindow::CCWindowNew(lua_State *L) CLuaCCWindow **udata = (CLuaCCWindow **) lua_newuserdata(L, sizeof(CLuaCCWindow *)); *udata = new CLuaCCWindow(); - (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str(), 0, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); + (*udata)->w = new CComponentsWindow(x, y, dx, dy, name.c_str(), icon.c_str(), NULL, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_body, (fb_pixel_t)color_shadow); /* Ignore percent conversion of width and height to remain compatible with the Lua API */ (*udata)->w->setWidth(dx);