CLuaInstance::CPictureNew: When dx and dy = 0 then use...

...'NO_SCALE' modus for object creation (icon)

 - Set Lua api version to 1.15


Origin commit data
------------------
Branch: ni/coolstream
Commit: 573eb7f7ad
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2015-11-27 (Fri, 27 Nov 2015)



------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2015-11-27 12:12:00 +01:00
parent be655e8b24
commit fdf2b95fa6
2 changed files with 5 additions and 2 deletions

View File

@@ -2684,6 +2684,9 @@ int CLuaInstance::CPictureNew(lua_State *L)
CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *));
*udata = new CLuaPicture();
if (dx == 0 && dy == 0) /* NO_SCALE */
(*udata)->cp = new CComponentsPicture(x, y, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency);
else
(*udata)->cp = new CComponentsPicture(x, y, dx, dy, image_name, pw, has_shadow, (fb_pixel_t)color_frame, (fb_pixel_t)color_background, (fb_pixel_t)color_shadow, transparency);
(*udata)->parent = pw;
luaL_getmetatable(L, "cpicture");

View File

@@ -34,7 +34,7 @@ extern "C" {
#include <vector>
#define LUA_API_VERSION_MAJOR 1
#define LUA_API_VERSION_MINOR 14
#define LUA_API_VERSION_MINOR 15
typedef std::pair<lua_Integer, Font*> fontmap_pair_t;
typedef std::map<lua_Integer, Font*> fontmap_t;