Merge branch 'ni/tuxbox' into ni/mp/tuxbox

Conflicts:
	configure.ac


Origin commit data
------------------
Branch: ni/coolstream
Commit: ff2ee78317
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-05-16 (Tue, 16 May 2017)



------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-05-16 15:28:08 +02:00
23 changed files with 185 additions and 87 deletions

View File

@@ -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 75

View File

@@ -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;
lua_Integer 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);
@@ -220,10 +221,10 @@ int CLuaInstCCWindow::CCWindowSetCaption(lua_State *L)
std::string name = "";
tableLookup(L, "name", name) || tableLookup(L, "title", name) || tableLookup(L, "caption", name);
lua_Integer alignment = (lua_Integer)CTextBox::NO_AUTO_LINEBREAK;
lua_Integer alignment = (lua_Integer)DEFAULT_TITLE_ALIGN;
tableLookup(L, "alignment", alignment);
D->w->setWindowCaption(name, alignment | (lua_Integer)CTextBox::NO_AUTO_LINEBREAK);
D->w->setWindowCaption(name, (cc_title_alignment_t)alignment);
return 0;
}

View File

@@ -29,7 +29,7 @@ class CLuaCCWindow
~CLuaCCWindow() { delete w; }
};
class CLuaInstCCWindow
class CLuaInstCCWindow : CCHeaderTypes
{
public:
CLuaInstCCWindow() {};