1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 06:15:10 +03:00

[Horus] GUI continued

This commit is contained in:
Bertrand Songis 2016-02-25 23:10:58 +01:00
parent 83887f1532
commit 2b9242fac2
70 changed files with 1770 additions and 1474 deletions

View file

@ -27,7 +27,7 @@
#define IS_FILE(fname) ((bool)(NODE_TYPE(fname)))
int currentBitmapIndex = 0;
uint8_t * currentBitmap = NULL;
BitmapBuffer * currentBitmap = NULL;
bool menuGeneralSdManagerInfo(evt_t event)
{
@ -365,12 +365,12 @@ bool menuGeneralSdManager(evt_t _event)
if (ext && (!strcasecmp(ext, BITMAPS_EXT) || !strcasecmp(ext, PNG_EXT) || !strcasecmp(ext, JPG_EXT))) {
if (currentBitmapIndex != menuVerticalPosition) {
currentBitmapIndex = menuVerticalPosition;
free(currentBitmap);
currentBitmap = bmpLoad(reusableBuffer.sdmanager.lines[index]);
delete currentBitmap;
currentBitmap = BitmapBuffer::load(reusableBuffer.sdmanager.lines[index]);
// TODO scale in case of a too large bitmap
}
if (currentBitmap) {
// TODO scale in case of a too large bitmap
lcdDrawBitmap(LCD_W / 2, LCD_H / 2, currentBitmap);
lcd->drawBitmap(LCD_W / 2, LCD_H / 2, currentBitmap);
}
}