Moved even more bitmaps to flash
@@ -40,5 +40,5 @@ add_bitmaps_target(${BITMAP_TARGET_PREFIX}_bootloader_icons ${RADIO_SRC_DIR}/bit
|
||||
|
||||
add_dependencies(${BITMAP_TARGET_PREFIX}_bitmaps ${BITMAP_TARGET_PREFIX}_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_button_bitmaps ${BITMAP_TARGET_PREFIX}_alpha_bitmaps
|
||||
${BITMAP_TARGET_PREFIX}_alpha_calibration_bitmaps ${BITMAP_TARGET_PREFIX}_masks ${BITMAP_TARGET_PREFIX}_slider_masks ${BITMAP_TARGET_PREFIX}_layouts_masks
|
||||
${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_themes_masks ${BITMAP_TARGET_PREFIX}_themes_alpha
|
||||
${BITMAP_TARGET_PREFIX}_volume_masks ${BITMAP_TARGET_PREFIX}_bootloader_bitmaps ${BITMAP_TARGET_PREFIX}_bootloader_icons )
|
||||
${BITMAP_TARGET_PREFIX}_fonts ${BITMAP_TARGET_PREFIX}_themes_masks ${BITMAP_TARGET_PREFIX}_themes_alpha ${BITMAP_TARGET_PREFIX}_splash ${BITMAP_TARGET_PREFIX}_volume_masks
|
||||
${BITMAP_TARGET_PREFIX}_bootloader_bitmaps ${BITMAP_TARGET_PREFIX}_bootloader_icons )
|
||||
|
||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 661 B |
|
After Width: | Height: | Size: 773 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 756 B |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
@@ -195,7 +195,7 @@ const uint8_t LBM_SWIPE_RIGHT[] = {
|
||||
BitmapBuffer * calibStick = nullptr;
|
||||
BitmapBuffer * calibStickBackground = nullptr;
|
||||
BitmapBuffer * calibTrackpBackground = nullptr;
|
||||
BitmapBuffer * modelselIconBitmap = nullptr;
|
||||
//BitmapBuffer * modelselIconBitmap = nullptr;
|
||||
BitmapBuffer * modelselSdFreeBitmap = nullptr;
|
||||
BitmapBuffer * modelselModelQtyBitmap = nullptr;
|
||||
BitmapBuffer * modelselModelNameBitmap = nullptr;
|
||||
|
||||
@@ -74,7 +74,7 @@ extern const uint8_t LBM_SWIPE_CIRCLE[];
|
||||
extern const uint8_t LBM_SWIPE_LEFT[];
|
||||
extern const uint8_t LBM_SWIPE_RIGHT[];
|
||||
|
||||
extern BitmapBuffer * modelselIconBitmap;
|
||||
//extern BitmapBuffer * modelselIconBitmap;
|
||||
extern BitmapBuffer * modelselSdFreeBitmap;
|
||||
extern BitmapBuffer * modelselModelQtyBitmap;
|
||||
extern BitmapBuffer * modelselModelNameBitmap;
|
||||
|
||||
@@ -97,18 +97,14 @@ void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char
|
||||
if (totalDuration == 0)
|
||||
return;
|
||||
|
||||
static const BitmapBuffer* shutdown = nullptr;
|
||||
if (!shutdown) {
|
||||
shutdown = BitmapBuffer::loadBitmap(
|
||||
OpenTxTheme::instance()->getFilePath("shutdown.bmp"));
|
||||
}
|
||||
static const BitmapBuffer * shutdown = OpenTxTheme::instance()->shutdown;
|
||||
|
||||
lcd->reset();
|
||||
|
||||
if (shutdown) {
|
||||
OpenTxTheme::instance()->drawBackground(lcd);
|
||||
lcd->drawBitmap((LCD_W - shutdown->width()) / 2,
|
||||
(LCD_H - shutdown->height()) / 2, shutdown);
|
||||
lcd->drawMask((LCD_W - shutdown->width()) / 2,
|
||||
(LCD_H - shutdown->height()) / 2, shutdown, DEFAULT_COLOR);
|
||||
|
||||
int quarter = duration / (totalDuration / 5);
|
||||
if (quarter >= 1)
|
||||
lcd->drawBitmapPattern(LCD_W / 2, (LCD_H - SHUTDOWN_CIRCLE_DIAMETER) / 2,
|
||||
|
||||
@@ -54,16 +54,14 @@ void FullScreenDialog::paint(BitmapBuffer * dc)
|
||||
FOCUS_COLOR, OPACITY(8));
|
||||
|
||||
if (type == WARNING_TYPE_ALERT || type == WARNING_TYPE_ASTERISK) {
|
||||
dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->asterisk);
|
||||
}
|
||||
else if (type == WARNING_TYPE_INFO) {
|
||||
dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->busy);
|
||||
}
|
||||
else { // confirmation
|
||||
dc->drawBitmap(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->question);
|
||||
dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->asterisk, ALARM_COLOR);
|
||||
} else if (type == WARNING_TYPE_INFO) {
|
||||
dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->busy, ALARM_COLOR);
|
||||
} else { // confirmation
|
||||
dc->drawMask(ALERT_BITMAP_LEFT, ALERT_BITMAP_TOP,
|
||||
OpenTxTheme::instance()->question, ALARM_COLOR);
|
||||
}
|
||||
|
||||
if (type == WARNING_TYPE_ALERT) {
|
||||
|
||||
@@ -28,6 +28,7 @@ extern OpenTxTheme * defaultTheme;
|
||||
const BitmapBuffer * OpenTxTheme::asterisk = nullptr;
|
||||
const BitmapBuffer * OpenTxTheme::question = nullptr;
|
||||
const BitmapBuffer * OpenTxTheme::busy = nullptr;
|
||||
const BitmapBuffer * OpenTxTheme::shutdown = nullptr;
|
||||
|
||||
const uint8_t LBM_FOLDER[] = {
|
||||
#include "mask_folder.lbm"
|
||||
@@ -44,6 +45,22 @@ const uint8_t LBM_USB_PLUGGED[] = {
|
||||
#include "mask_usb_symbol.lbm"
|
||||
};
|
||||
|
||||
const uint8_t asterisk_bitmap[] = {
|
||||
#include "mask_asterisk.lbm"
|
||||
};
|
||||
|
||||
const uint8_t question_bitmap[] = {
|
||||
#include "mask_question.lbm"
|
||||
};
|
||||
|
||||
const uint8_t busy_bitmap[] = {
|
||||
#include "mask_busy.lbm"
|
||||
};
|
||||
|
||||
const uint8_t shutdown_bitmap[] = {
|
||||
#include "mask_shutdown.lbm"
|
||||
};
|
||||
|
||||
std::list<OpenTxTheme *> & getRegisteredThemes()
|
||||
{
|
||||
static std::list<OpenTxTheme *> themes;
|
||||
@@ -72,11 +89,13 @@ void OpenTxTheme::init() const
|
||||
void OpenTxTheme::load() const
|
||||
{
|
||||
if (!asterisk)
|
||||
asterisk = BitmapBuffer::loadBitmap(getFilePath("asterisk.bmp"));
|
||||
asterisk = BitmapBuffer::load8bitMask(asterisk_bitmap);
|
||||
if (!question)
|
||||
question = BitmapBuffer::loadBitmap(getFilePath("question.bmp"));
|
||||
question = BitmapBuffer::load8bitMask(question_bitmap);
|
||||
if (!busy)
|
||||
busy = BitmapBuffer::loadBitmap(getFilePath("busy.bmp"));
|
||||
busy = BitmapBuffer::load8bitMask(busy_bitmap);
|
||||
if (!shutdown)
|
||||
shutdown = BitmapBuffer::load8bitMask(shutdown_bitmap);
|
||||
}
|
||||
|
||||
ZoneOptionValue * OpenTxTheme::getOptionValue(unsigned int index) const
|
||||
|
||||
@@ -114,6 +114,7 @@ class OpenTxTheme: public Theme
|
||||
static const BitmapBuffer * asterisk;
|
||||
static const BitmapBuffer * question;
|
||||
static const BitmapBuffer * busy;
|
||||
static const BitmapBuffer * shutdown;
|
||||
};
|
||||
|
||||
OpenTxTheme * getTheme(const char * name);
|
||||
|
||||
@@ -226,3 +226,19 @@ const uint8_t stick_background[] = {
|
||||
const uint8_t trackp_background[] = {
|
||||
#include "alpha_trackp_background.lbm"
|
||||
};
|
||||
const uint8_t mask_sdfree[] = {
|
||||
#include "mask_sdfree.lbm"
|
||||
};
|
||||
const uint8_t mask_modelqty[] = {
|
||||
#include "mask_modelqty.lbm"
|
||||
};
|
||||
const uint8_t mask_modelname[] = {
|
||||
#include "mask_modelname.lbm"
|
||||
};
|
||||
const uint8_t mask_moveback[] = {
|
||||
#include "mask_moveback.lbm"
|
||||
};
|
||||
const uint8_t mask_moveico[] = {
|
||||
#include "mask_moveico.lbm"
|
||||
};
|
||||
|
||||
|
||||
@@ -213,29 +213,33 @@ class Theme480: public OpenTxTheme
|
||||
trackp_background, sizeof(trackp_background));
|
||||
|
||||
// Model Selection screen
|
||||
delete modelselIconBitmap;
|
||||
modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR);
|
||||
if (modelselIconBitmap) {
|
||||
BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png"));
|
||||
modelselIconBitmap->drawBitmap(20, 8, bitmap);
|
||||
delete bitmap;
|
||||
}
|
||||
|
||||
// Unused:
|
||||
//
|
||||
// delete modelselIconBitmap;
|
||||
// modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR);
|
||||
// if (modelselIconBitmap) {
|
||||
// BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png"));
|
||||
// modelselIconBitmap->drawBitmap(20, 8, bitmap);
|
||||
// delete bitmap;
|
||||
// }
|
||||
|
||||
delete modelselSdFreeBitmap;
|
||||
modelselSdFreeBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_sdfree.png"));
|
||||
modelselSdFreeBitmap = BitmapBuffer::load8bitMask(mask_sdfree);
|
||||
|
||||
delete modelselModelQtyBitmap;
|
||||
modelselModelQtyBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_modelqty.png"));
|
||||
modelselModelQtyBitmap = BitmapBuffer::load8bitMask(mask_modelqty);
|
||||
|
||||
delete modelselModelNameBitmap;
|
||||
modelselModelNameBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_modelname.png"));
|
||||
modelselModelNameBitmap = BitmapBuffer::load8bitMask(mask_modelname);
|
||||
|
||||
delete modelselModelMoveBackground;
|
||||
modelselModelMoveBackground = BitmapBuffer::loadMask(getFilePath("modelsel/mask_moveback.png"));
|
||||
modelselModelMoveBackground = BitmapBuffer::load8bitMask(mask_moveback);
|
||||
|
||||
delete modelselModelMoveIcon;
|
||||
modelselModelMoveIcon = BitmapBuffer::loadMask(getFilePath("modelsel/mask_moveico.png"));
|
||||
modelselModelMoveIcon = BitmapBuffer::load8bitMask(mask_moveico);
|
||||
|
||||
//TODO: should be loaded from LUA, not here!!!
|
||||
delete modelselWizardBackground;
|
||||
modelselWizardBackground = BitmapBuffer::loadBitmap(getFilePath("wizard/background.png"));
|
||||
|
||||
|
||||
@@ -216,13 +216,13 @@ class FlyskyTheme: public OpenTxTheme
|
||||
calibTrackpBackground = BitmapBuffer::loadBitmap(getFilePath("trackp_background.png"));
|
||||
|
||||
// Model Selection screen
|
||||
delete modelselIconBitmap;
|
||||
modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR);
|
||||
if (modelselIconBitmap) {
|
||||
BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png"));
|
||||
modelselIconBitmap->drawBitmap(20, 8, bitmap);
|
||||
delete bitmap;
|
||||
}
|
||||
// delete modelselIconBitmap;
|
||||
// modelselIconBitmap = BitmapBuffer::loadMaskOnBackground("modelsel/mask_iconback.png", TITLE_BGCOLOR, DEFAULT_BGCOLOR);
|
||||
// if (modelselIconBitmap) {
|
||||
// BitmapBuffer * bitmap = BitmapBuffer::loadBitmap(getFilePath("modelsel/icon_default.png"));
|
||||
// modelselIconBitmap->drawBitmap(20, 8, bitmap);
|
||||
// delete bitmap;
|
||||
// }
|
||||
|
||||
delete modelselSdFreeBitmap;
|
||||
modelselSdFreeBitmap = BitmapBuffer::loadMask(getFilePath("modelsel/mask_sdfree.png"));
|
||||
|
||||