mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
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:
@@ -2684,7 +2684,10 @@ int CLuaInstance::CPictureNew(lua_State *L)
|
|||||||
|
|
||||||
CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *));
|
CLuaPicture **udata = (CLuaPicture **) lua_newuserdata(L, sizeof(CLuaPicture *));
|
||||||
*udata = new CLuaPicture();
|
*udata = new CLuaPicture();
|
||||||
(*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);
|
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;
|
(*udata)->parent = pw;
|
||||||
luaL_getmetatable(L, "cpicture");
|
luaL_getmetatable(L, "cpicture");
|
||||||
lua_setmetatable(L, -2);
|
lua_setmetatable(L, -2);
|
||||||
|
@@ -34,7 +34,7 @@ extern "C" {
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define LUA_API_VERSION_MAJOR 1
|
#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::pair<lua_Integer, Font*> fontmap_pair_t;
|
||||||
typedef std::map<lua_Integer, Font*> fontmap_t;
|
typedef std::map<lua_Integer, Font*> fontmap_t;
|
||||||
|
Reference in New Issue
Block a user