Show sleep popup with bold border and text.

This commit is contained in:
Jonas Diemer 2025-12-31 11:53:25 +01:00
parent d2cddfea92
commit ce2ad0cfb4

View File

@ -42,16 +42,16 @@ void SleepActivity::onEnter() {
}
void SleepActivity::renderPopup(const char* message) const {
const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, message);
const int textWidth = renderer.getTextWidth(UI_12_FONT_ID, message, BOLD);
constexpr int margin = 20;
const int x = (renderer.getScreenWidth() - textWidth - margin * 2) / 2;
constexpr int y = 117;
const int w = textWidth + margin * 2;
const int h = renderer.getLineHeight(UI_12_FONT_ID) + margin * 2;
// renderer.clearScreen();
renderer.fillRect(x + 5, y + 5, w - 10, h - 10, true);
renderer.drawText(UI_12_FONT_ID, x + margin, y + margin, message, false);
renderer.drawRect(x + 5, y + 5, w - 10, h - 10);
renderer.fillRect(x - 5, y - 5, w + 10, h + 10, true);
renderer.fillRect(x + 5, y + 5, w - 10, h - 10, false);
renderer.drawText(UI_12_FONT_ID, x + margin, y + margin, message, true, BOLD);
renderer.displayBuffer();
}