| 159 | } |
| 160 | |
| 161 | void drawButton( |
| 162 | int32_t x, int32_t y, int32_t w, int32_t h, uint32_t color, const char *text, bool inverted = false |
| 163 | ) { |
| 164 | if (inverted) { |
| 165 | tft.fillRoundRect(x, y, w, h, 5, color); |
| 166 | } else { |
| 167 | tft.fillRoundRect(x, y, w, h, 5, TFT_BLACK); |
| 168 | tft.drawRoundRect(x, y, w, h, 5, color); |
| 169 | } |
| 170 | tft.setTextColor(inverted ? TFT_BLACK : color); |
| 171 | tft.drawString(text, x + w / 2, y + h); |
| 172 | } |
| 173 | |
| 174 | int8_t displayMessage( |
| 175 | const char *message, const char *leftButton, const char *centerButton, const char *rightButton, |
no test coverage detected