mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-09 15:14:45 +00:00
Mute icon and bell emote added
This commit is contained in:
parent
c40fdc9a43
commit
fe25e5efd5
@ -92,9 +92,9 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
||||
} else {
|
||||
int batteryX = 1;
|
||||
int batteryY = HEADER_OFFSET_Y + 1;
|
||||
#ifdef USE_EINK
|
||||
#ifdef USE_EINK
|
||||
batteryY += 2;
|
||||
#endif
|
||||
#endif
|
||||
display->drawXbm(batteryX, batteryY, 7, 11, batteryBitmap_v);
|
||||
if (isCharging && isBoltVisibleShared)
|
||||
display->drawXbm(batteryX + 1, batteryY + 3, 5, 5, lightning_bolt_v);
|
||||
@ -139,7 +139,8 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
||||
if (config.display.use_12h_clock) {
|
||||
bool isPM = hour >= 12;
|
||||
hour %= 12;
|
||||
if (hour == 0) hour = 12;
|
||||
if (hour == 0)
|
||||
hour = 12;
|
||||
snprintf(timeStr, sizeof(timeStr), "%d:%02d%s", hour, minute, isPM ? "p" : "a");
|
||||
}
|
||||
|
||||
@ -175,12 +176,9 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
||||
display->drawXbm(iconX, iconY, mail_width, mail_height, mail);
|
||||
}
|
||||
} else if (isMuted) {
|
||||
const char* muteStr = "M";
|
||||
int mWidth = display->getStringWidth(muteStr);
|
||||
int mX = iconRightEdge - mWidth;
|
||||
display->drawString(mX, textY, muteStr);
|
||||
if (isBold)
|
||||
display->drawString(mX + 1, textY, muteStr);
|
||||
int iconX = iconRightEdge - mute_symbol_width;
|
||||
int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;
|
||||
display->drawXbm(iconX, iconY, mute_symbol_width, mute_symbol_height, mute_symbol);
|
||||
}
|
||||
|
||||
// === Draw Time ===
|
||||
@ -218,17 +216,13 @@ void drawCommonHeader(OLEDDisplay *display, int16_t x, int16_t y)
|
||||
display->drawXbm(iconX, iconY, mail_width, mail_height, mail);
|
||||
}
|
||||
} else if (isMuted) {
|
||||
const char* muteStr = "M";
|
||||
int mWidth = display->getStringWidth(muteStr);
|
||||
int mX = iconRightEdge - mWidth;
|
||||
display->drawString(mX, textY, muteStr);
|
||||
if (isBold)
|
||||
display->drawString(mX + 1, textY, muteStr);
|
||||
int iconX = iconRightEdge - mute_symbol_width;
|
||||
int iconY = textY + (FONT_HEIGHT_SMALL - mail_height) / 2;
|
||||
display->drawXbm(iconX, iconY, mute_symbol_width, bell_alert_height, bell_alert);
|
||||
}
|
||||
}
|
||||
|
||||
display->setColor(WHITE); // Reset for other UI
|
||||
}
|
||||
|
||||
|
||||
} // namespace graphics
|
||||
|
@ -244,6 +244,22 @@ static unsigned char poo[] PROGMEM = {
|
||||
0x01, 0x00, 0x1F, 0x20, 0x03, 0xE0, 0x03, 0x20, 0x07, 0x7E, 0x04, 0x30, 0xFE, 0x0F, 0xFC, 0x1F, 0xF0, 0x00, 0xF0, 0x0F,
|
||||
};
|
||||
|
||||
#define bell_icon_width 30
|
||||
#define bell_icon_height 30
|
||||
static unsigned char bell_icon[] PROGMEM = {
|
||||
0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b11110000,
|
||||
0b00000011, 0b00000000, 0b00000000, 0b11111100, 0b00001111, 0b00000000, 0b00000000, 0b00001111, 0b00111100, 0b00000000,
|
||||
0b00000000, 0b00000011, 0b00110000, 0b00000000, 0b10000000, 0b00000001, 0b01100000, 0b00000000, 0b11000000, 0b00000000,
|
||||
0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000,
|
||||
0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000,
|
||||
0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b11000000, 0b00000000,
|
||||
0b11000000, 0b00000000, 0b11000000, 0b00000000, 0b01000000, 0b00000000, 0b10000000, 0b00000000, 0b01100000, 0b00000000,
|
||||
0b10000000, 0b00000001, 0b01110000, 0b00000000, 0b10000000, 0b00000011, 0b00110000, 0b00000000, 0b00000000, 0b00000011,
|
||||
0b00011000, 0b00000000, 0b00000000, 0b00000110, 0b11110000, 0b11111111, 0b11111111, 0b00000011, 0b00000000, 0b00001100,
|
||||
0b00001100, 0b00000000, 0b00000000, 0b00011000, 0b00000110, 0b00000000, 0b00000000, 0b11111000, 0b00000111, 0b00000000,
|
||||
0b00000000, 0b11100000, 0b00000001, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000,
|
||||
0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000, 0b00000000};
|
||||
|
||||
#define mail_width 10
|
||||
#define mail_height 7
|
||||
static const unsigned char mail[] PROGMEM = {
|
||||
@ -390,6 +406,19 @@ const uint8_t icon_module[] PROGMEM = {
|
||||
0b00011000 // ░░░██░░░
|
||||
};
|
||||
|
||||
#define mute_symbol_width 8
|
||||
#define mute_symbol_height 8
|
||||
const uint8_t mute_symbol[] PROGMEM = {
|
||||
0b00011001, // █
|
||||
0b00100110, // █
|
||||
0b00100100, // ████
|
||||
0b01001010, // █ █ █
|
||||
0b01010010, // █ █ █
|
||||
0b01100010, // ████████
|
||||
0b11111111, // █ █
|
||||
0b10011000, // █
|
||||
};
|
||||
|
||||
// Bell icon for Alert Message
|
||||
#define bell_alert_width 8
|
||||
#define bell_alert_height 8
|
||||
|
Loading…
Reference in New Issue
Block a user