mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 02:41:57 +00:00
- 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>
27 lines
720 B
C++
27 lines
720 B
C++
#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;
|
||
}
|
||
};
|