mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-13 06:13:35 +00:00
add smiley emoji
This commit is contained in:
parent
de76caca32
commit
4889ad4654
@ -966,6 +966,10 @@ static void drawTextMessageFrame(OLEDDisplay *display, OLEDDisplayUiState *state
|
|||||||
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - thumbs_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - thumbs_height) / 2 + 2 + 5, thumbs_width, thumbs_height,
|
||||||
thumbdown);
|
thumbdown);
|
||||||
|
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F60A") == 0 || strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F600") == 0 || strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F642") == 0 || strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F609") == 0 || strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "\U0001F601") == 0) { // matches 5 different common smileys, so that the phone user doesn't have to remember which one is compatible
|
||||||
|
display->drawXbm(x + (SCREEN_WIDTH - smiley_width) / 2,
|
||||||
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - smiley_height) / 2 + 2 + 5, smiley_width, smiley_height,
|
||||||
|
smiley);
|
||||||
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "❓") == 0) {
|
} else if (strcmp(reinterpret_cast<const char *>(mp.decoded.payload.bytes), "❓") == 0) {
|
||||||
display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2,
|
display->drawXbm(x + (SCREEN_WIDTH - question_width) / 2,
|
||||||
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height,
|
y + (SCREEN_HEIGHT - FONT_HEIGHT_MEDIUM - question_height) / 2 + 2 + 5, question_width, question_height,
|
||||||
|
@ -56,6 +56,17 @@ static unsigned char thumbdown[] PROGMEM = {
|
|||||||
0x80, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
|
0x80, 0x09, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x00,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define smiley_height 30
|
||||||
|
#define smiley_width 30
|
||||||
|
static unsigned char smiley[] PROGMEM = {
|
||||||
|
0x00, 0xfe, 0x0f, 0x00, 0x80, 0x01, 0x30, 0x00, 0x40, 0x00, 0xc0, 0x00, 0x20, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x02,
|
||||||
|
0x08, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x08, 0x04, 0x00, 0x00, 0x10, 0x02, 0x0e, 0x0e, 0x10, 0x02, 0x09, 0x12, 0x10,
|
||||||
|
0x01, 0x09, 0x12, 0x20, 0x01, 0x0f, 0x1e, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20,
|
||||||
|
0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x20, 0x81, 0x00, 0x20, 0x20,
|
||||||
|
0x82, 0x00, 0x20, 0x10, 0x02, 0x01, 0x10, 0x10, 0x04, 0x02, 0x08, 0x08, 0x04, 0xfc, 0x07, 0x08, 0x08, 0x00, 0x00, 0x04,
|
||||||
|
0x10, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x01, 0x40, 0x00, 0xc0, 0x00, 0x80, 0x01, 0x30, 0x00, 0x00, 0xfe, 0x0f, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
#define question_height 25
|
#define question_height 25
|
||||||
#define question_width 25
|
#define question_width 25
|
||||||
static unsigned char question[] PROGMEM = {
|
static unsigned char question[] PROGMEM = {
|
||||||
|
Loading…
Reference in New Issue
Block a user