Files
JakubandClaude Opus 5.5 8c20914689 refactor(ui): upstream's UIColor palette in place of the DARK/LIGHT enum
- DisplayDriver takes ColorVal; each driver's .cpp defines the UIColor roles
  (window_bkg, primary_txt, ...) in its own values. ui-new draws in two:
  window_bkg and primary_txt. OLED and e-ink look as before (sim screens
  pixel-identical).
- E213, E290, LGFX, Null, ST7735, ST7789LCD, U8g2 taken whole from upstream
  (with them the rewritten ST7735 driver and the Heltec V4 R8 TFT display).
- SH1106, SSD1306, ST7789, EinkGfxDisplay and the sim drivers converted.
- ui-orig, ui-tiny, simple_* get upstream's colour roles; the repeater's UI
  taken from upstream (its power-off screen).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:42:04 +02:00

27 lines
720 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
// Tools › Flashlight: the whole panel lit at full brightness, kept on (no
// auto-off) until a key. Not on e-ink, which gives no light. Leaving it, by
// a key or anything that changes the screen, puts the brightness back
// (UITask::setCurrScreen).
// Included by UITask.cpp.
class FlashlightScreen : public UIScreen {
UITask* _task;
public:
FlashlightScreen(UITask* task) : _task(task) {}
int render(DisplayDriver& display) override {
display.setBrightness(4);
display.setColor(UIColor::primary_txt);
display.fillRect(0, 0, display.width(), display.height());
return 1000;
}
bool handleInput(char c) override {
(void)c;
_task->leaveTool();
return true;
}
};