| 244 | } |
| 245 | |
| 246 | void Printspoofer(String text, uint16_t color, bool extraSpace = false) { |
| 247 | tft.drawFastHLine(0, 19, 240, UI_LINE); |
| 248 | const int visibleLines = spooferVisibleLines(); |
| 249 | if (spooferlineIndex >= visibleLines) { |
| 250 | for (int i = 0; i < visibleLines - 1; i++) { |
| 251 | spooferBuffer[i] = spooferBuffer[i + 1]; |
| 252 | colorspooferBuffer[i] = colorspooferBuffer[i + 1]; |
| 253 | } |
| 254 | spooferlineIndex = visibleLines - 1; |
| 255 | } |
| 256 | |
| 257 | spooferBuffer[spooferlineIndex] = text; |
| 258 | colorspooferBuffer[spooferlineIndex] = color; |
| 259 | spooferlineIndex++; |
| 260 | |
| 261 | if (extraSpace && spooferlineIndex < visibleLines) { |
| 262 | spooferBuffer[spooferlineIndex] = ""; |
| 263 | colorspooferBuffer[spooferlineIndex] = TFT_WHITE; |
| 264 | spooferlineIndex++; |
| 265 | } |
| 266 | |
| 267 | for (int i = 0; i < spooferlineIndex && i < visibleLines; i++) { |
| 268 | int yPos = i * LINE_HEIGHT + SPOOFER_LOG_TOP; |
| 269 | if (!spooferLineFits(yPos)) { |
| 270 | continue; |
| 271 | } |
| 272 | |
| 273 | tft.fillRect(5, yPos, tft.width() - 10, LINE_HEIGHT, TFT_BLACK); |
| 274 | |
| 275 | tft.setTextColor(colorspooferBuffer[i], TFT_BLACK); |
| 276 | tft.setCursor(5, yPos); |
| 277 | tft.print(spooferBuffer[i]); |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | void sppferLoadingBar(int step) { |
| 282 | int totalSteps = 4; |
no test coverage detected