2025-12-06 04:20:03 +11:00
|
|
|
#include "SleepScreen.h"
|
|
|
|
|
|
2025-12-08 22:06:09 +11:00
|
|
|
#include <GfxRenderer.h>
|
2025-12-06 04:20:03 +11:00
|
|
|
|
2025-12-08 22:06:09 +11:00
|
|
|
#include "config.h"
|
2025-12-08 19:48:49 +11:00
|
|
|
#include "images/CrossLarge.h"
|
2025-12-06 04:20:03 +11:00
|
|
|
|
2025-12-08 19:48:49 +11:00
|
|
|
void SleepScreen::onEnter() {
|
2025-12-08 22:06:09 +11:00
|
|
|
const auto pageWidth = GfxRenderer::getScreenWidth();
|
|
|
|
|
const auto pageHeight = GfxRenderer::getScreenHeight();
|
2025-12-08 19:48:49 +11:00
|
|
|
|
|
|
|
|
renderer.clearScreen();
|
|
|
|
|
renderer.drawImage(CrossLarge, (pageHeight - 128) / 2, (pageWidth - 128) / 2, 128, 128);
|
2025-12-08 22:06:09 +11:00
|
|
|
const int width = renderer.getTextWidth(UI_FONT_ID, "CrossPoint", BOLD);
|
|
|
|
|
renderer.drawText(UI_FONT_ID, (pageWidth - width) / 2, pageHeight / 2 + 70, "CrossPoint", true, BOLD);
|
|
|
|
|
const int bootingWidth = renderer.getTextWidth(SMALL_FONT_ID, "SLEEPING");
|
|
|
|
|
renderer.drawText(SMALL_FONT_ID, (pageWidth - bootingWidth) / 2, pageHeight / 2 + 95, "SLEEPING");
|
2025-12-08 19:48:49 +11:00
|
|
|
renderer.invertScreen();
|
2025-12-08 22:06:09 +11:00
|
|
|
renderer.displayBuffer(EInkDisplay::HALF_REFRESH);
|
2025-12-08 19:48:49 +11:00
|
|
|
}
|