From 9f013d3d52512d97a99319082a56930ff4a10821 Mon Sep 17 00:00:00 2001 From: mlodawy <105587112+mlodawy@users.noreply.github.com> Date: Mon, 16 May 2022 17:10:54 +0200 Subject: [PATCH] Adding custom icon for language button (#117) --- esp32_marauder/Assets.h | 10 ++++++++-- esp32_marauder/MenuFunctions.cpp | 2 +- esp32_marauder/MenuFunctions.h | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/esp32_marauder/Assets.h b/esp32_marauder/Assets.h index d1112f57de7..8a2bdced9cb 100644 --- a/esp32_marauder/Assets.h +++ b/esp32_marauder/Assets.h @@ -261,8 +261,14 @@ PROGMEM static const unsigned char menu_icons[][66] = { 0xBF, 0xFF, 0x3C, 0xDF, 0x7F, 0x3C, 0xDF, 0x3F, 0x3D, 0xEF, 0x9F, 0x3D, 0x1F, 0xCE, 0x3D, 0xDF, 0xE4, 0x3D, 0xBF, 0xF1, 0x3E, 0x7F, 0x7F, 0x3F, 0xFF, 0xBE, 0x3F, 0xFF, 0xC1, 0x3F, 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F, - 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F} - }; + 0xFF, 0xFF, 0x3F, 0xFF, 0xFF, 0x3F}, + {0x7F, 0xFE,0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0xF8, 0xFF, 0x00, 0x00, 0xF8, //LANGUAGE: 35 + 0x00, 0x00, 0xF8, 0xCF, 0x3F, 0xFF, 0xCF, 0x3F ,0xFF, 0x9F, 0x9F, 0xFF, + 0x9F, 0x8F, 0xFF, 0x3F, 0xC7, 0xFF, 0x3F, 0xE2, 0xFF, 0xFF, 0xF0, 0xFF, + 0x7F, 0xF8, 0xFF, 0x1F, 0xF2, 0xFE, 0x87, 0x67, 0xFD, 0xE0, 0x4F, 0xFD, + 0xF9, 0xBF, 0xFB, 0xFF, 0xBF, 0xFB, 0xFF, 0x3F, 0xF8, 0xFF, 0xDF, 0xF7, + 0xFF, 0xDF, 0xF7, 0xFF, 0xDF, 0xF7} +}; #ifndef MARAUDER_MINI const uint8_t MarauderTitle[] PROGMEM = { diff --git a/esp32_marauder/MenuFunctions.cpp b/esp32_marauder/MenuFunctions.cpp index 40268941ddf..ee453d6d251 100644 --- a/esp32_marauder/MenuFunctions.cpp +++ b/esp32_marauder/MenuFunctions.cpp @@ -1724,7 +1724,7 @@ void MenuFunctions::RunSetup() wifi_scan_obj.currentScanMode = OTA_UPDATE; changeMenu(&whichUpdateMenu); }); - addNodes(&deviceMenu, "Language", TFT_WHITE, NULL, DRAW, [this]() { + addNodes(&deviceMenu, "Language", TFT_GREEN, NULL, LANGUAGE, [this]() { wifi_scan_obj.currentScanMode = SHOW_INFO; changeMenu(&languageMenu); }); diff --git a/esp32_marauder/MenuFunctions.h b/esp32_marauder/MenuFunctions.h index 3070c223104..904fc06020e 100644 --- a/esp32_marauder/MenuFunctions.h +++ b/esp32_marauder/MenuFunctions.h @@ -75,6 +75,7 @@ extern Settings settings_obj; #define ESP_UPDATE_ICO 32 #define BAD_USB_ICO 33 #define TEST_BAD_USB_ICO 34 +#define LANGUAGE 35 PROGMEM void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p); PROGMEM bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);