6#include <goodisplay/gdey029T94.h>
25 auto* gfx =
static_cast<Gdey029T94*
>(
display->getNativeHandle());
28 const uint16_t width =
display->getWidth();
29 const uint16_t height =
display->getHeight();
31 if (!partial) gfx->fillScreen(EPD_WHITE);
33 gfx->setTextColor(EPD_BLACK);
44 gfx->setTextColor(EPD_DARKGREY);
46 gfx->setTextColor(EPD_BLACK);
48 for (uint16_t i = 0; i <
len_; i++) {
50 const bool showPlain = revealed_ || isCursorChar;
51 char c = showPlain ?
text_[i] : maskChar_;
54 int16_t x = gfx->getCursorX();
55 int16_t y = gfx->getCursorY();
56 gfx->fillRect(x, y - 2, 8, 14, EPD_BLACK);
57 gfx->setTextColor(EPD_WHITE);
59 gfx->setTextColor(EPD_BLACK);
70 snprintf(countStr,
sizeof(countStr),
"%u/%u %s",
83 revealed_ = !revealed_;
91 return tr(revealed_ ?
"core.hint_password_revealed"
92 :
"core.hint_password_hidden");
Internationalization with English fallbacks in code and overlay translations loaded at runtime from a...
const char * getFooterHint() const override
void render(bool partial) override
Renders title, masked text box and footer.
InputResult onLongPress(char key) override
Long-press on Y toggles the reveal state. Other keys delegate to T9.
void markDirty() override
IDisplay * getDisplayInstance()
Returns lazily created singleton display instance.
void drawFooterBar(Gdey029T94 *gfx, uint16_t width, uint16_t height, const char *prefix, const char *hint, bool force=false)
Draws footer bar with optional prefix and hint text.
void drawHeaderLeft(Gdey029T94 *gfx, const char *title, int x, int y, uint16_t width, int underlineOffset=18)
void printText(Gdey029T94 *gfx, const char *text)
Draws CP437 text with the built-in 6x8 glyph font, byte-for-byte.
Centralized key-code constants for cdc_views.
const char * tr(const char *key)
Look up a translation by string key.
static constexpr int TEXT_Y
static constexpr int TITLE_Y
Layout constants mirror the ones used by T9InputView.
static constexpr char KEY_YES
Confirm / OK / Save.
static constexpr int TEXT_MARGIN