diff --git a/src/gui.cpp b/src/gui.cpp index 61a4d7e..fb86097 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -1575,12 +1575,12 @@ void BuildBWSelector() { drawButton(BWButtonLabelsFM[x], x, (BWset == x + 1 ? true : false)); } drawButton(BWButtonLabelsFM[16], 16, (BWset == 0 ? true : false)); - drawButton("OK", 19, false); + if (hardwaremodel == PORTABLE_TOUCH_ILI9341) drawButton("OK", 19, false); } else { for (int x = 0; x < 4; x++) { drawButton(BWButtonLabelsAM[x], x, (BWset == x + 1 ? true : false)); } - drawButton("OK", 19, false); + if (hardwaremodel == PORTABLE_TOUCH_ILI9341) drawButton("OK", 19, false); } } @@ -3762,6 +3762,17 @@ void DoMenu() { case 7: tft.pushImage (13, 30, 292, 170, popupbackground_wo); break; default: tft.pushImage (13, 30, 292, 170, popupbackground); break; } + if (hardwaremodel == PORTABLE_TOUCH_ILI9341) { + tft.fillRoundRect(18, 150, 60, 40, 6, FrameColor); + tft.drawRoundRect(18, 150, 60, 40, 6, ActiveColor); + tft.fillRoundRect(240, 150, 60, 40, 6, FrameColor); + tft.drawRoundRect(240, 150, 60, 40, 6, ActiveColor); + tft.fillRoundRect(240, 40, 60, 40, 6, FrameColor); + tft.drawRoundRect(240, 40, 60, 40, 6, ActiveColor); + tftPrint(0, "-", 48, 156, ActiveColor, ActiveColorSmooth, 28); + tftPrint(0, "+", 270, 160, ActiveColor, ActiveColorSmooth, 28); + tftPrint(0, "OK", 270, 48, ActiveColor, ActiveColorSmooth, 28); + } } switch (CurrentTheme) { @@ -4337,12 +4348,12 @@ void DoMenu() { OneBigLineSprite.setTextDatum(TL_DATUM); OneBigLineSprite.setTextColor(ActiveColor, ActiveColorSmooth, false); - OneBigLineSprite.drawString("dBμV", 155, 0); + OneBigLineSprite.drawString("dB", 155, 0); OneBigLineSprite.setTextDatum(TR_DATUM); OneBigLineSprite.setTextColor(PrimaryColor, PrimaryColorSmooth, false); OneBigLineSprite.drawString((LevelOffset > 0 ? "+" : "") + String(LevelOffset, DEC), 135, 0); OneBigLineSprite.pushSprite(24, 118); - tftPrint(-1, "dBμV", 190, 165, ActiveColor, ActiveColorSmooth, 28); + tftPrint(-1, "dBμV", 179, 165, ActiveColor, ActiveColorSmooth, 28); SStatusold = 2000; change = true; break; diff --git a/src/touch.cpp b/src/touch.cpp index 4c269a8..02f2daf 100644 --- a/src/touch.cpp +++ b/src/touch.cpp @@ -9,6 +9,15 @@ void doTouchEvent(uint16_t x, uint16_t y) { if (scandxmode) { cancelDXScan(); } else { + if (menu) { + if (menuopen) { + if (x > 18 && x < 78 && y > 150 && y < 190) KeyDown(); + if (x > 240 && x < 300 && y > 150 && y < 190) KeyUp(); + if (x > 240 && x < 300 && y > 40 && y < 80) ButtonPress(); + return; + } + } + if (!menu && !BWtune) { // All pages except menu if (x > 50 && x < 90 && y > 0 && y < 30 && band < BAND_GAP) { // --------------------- doStereoToggle(); // Stereo toggle diff --git a/src/touch.h b/src/touch.h index 2a16bae..2fc9c4d 100644 --- a/src/touch.h +++ b/src/touch.h @@ -13,6 +13,7 @@ extern bool afscreen; extern bool BWtune; extern bool leave; extern bool menu; +extern bool menuopen; extern bool scandxmode; extern bool seek; extern byte band; @@ -31,4 +32,7 @@ extern void doStereoToggle(); extern void cancelDXScan(); extern void doBW(); extern void drawButton(const char* text, byte button_number, bool active); +extern void KeyDown(); +extern void KeyUp(); +extern void ButtonPress(); #endif \ No newline at end of file