mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 06:15:10 +03:00
[Horus] Bitmaps dynamic load
This commit is contained in:
parent
63713578fe
commit
358badfed9
12 changed files with 117 additions and 99 deletions
|
@ -905,10 +905,8 @@ void luaLoadThemeCallback()
|
|||
char path[LUA_FULLPATH_MAXLEN+1];
|
||||
strcpy(path, THEMES_PATH "/");
|
||||
strcpy(path+sizeof(THEMES_PATH), bitmap);
|
||||
uint8_t * bitmapData = (uint8_t *)malloc(BITMAP_BUFFER_SIZE(51, 31));
|
||||
TRACE("path=%s bitmapData=%p %d %p", path, bitmapData, BITMAP_BUFFER_SIZE(51, 31), path);
|
||||
bmpLoad(bitmapData, path, 51, 31);
|
||||
LuaTheme * theme = new LuaTheme(name, bitmapData, themeOptions);
|
||||
uint8_t * bitmap = bmpLoad(path/*, 51, 31*/); // TODO rescale
|
||||
LuaTheme * theme = new LuaTheme(name, bitmap, themeOptions);
|
||||
theme->loadFunction = loadFunction;
|
||||
theme->drawBackgroundFunction = drawBackgroundFunction;
|
||||
theme->drawTopbarBackgroundFunction = drawTopbarBackgroundFunction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue