mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-18 15:17:42 +03:00
Move text around slightly on Boot and Sleep screens
This commit is contained in:
parent
1b60eefb20
commit
6f88008737
@ -12,8 +12,8 @@ void BootLogoScreen::onEnter() {
|
||||
// Location for images is from top right in landscape orientation
|
||||
renderer.drawImage(CrossLarge, (pageHeight - 128) / 2, (pageWidth - 128) / 2, 128, 128);
|
||||
const int width = renderer.getUiTextWidth("CrossPoint", BOLD);
|
||||
renderer.drawUiText((pageWidth - width)/ 2, pageHeight / 2 + 100, "CrossPoint", true, BOLD);
|
||||
renderer.drawUiText((pageWidth - width)/ 2, pageHeight / 2 + 70, "CrossPoint", true, BOLD);
|
||||
const int bootingWidth = renderer.getSmallTextWidth("BOOTING");
|
||||
renderer.drawSmallText((pageWidth - bootingWidth) / 2, pageHeight / 2 + 125, "BOOTING");
|
||||
renderer.drawSmallText((pageWidth - bootingWidth) / 2, pageHeight / 2 + 95, "BOOTING");
|
||||
renderer.flushDisplay();
|
||||
}
|
||||
|
||||
@ -11,9 +11,9 @@ void SleepScreen::onEnter() {
|
||||
renderer.clearScreen();
|
||||
renderer.drawImage(CrossLarge, (pageHeight - 128) / 2, (pageWidth - 128) / 2, 128, 128);
|
||||
const int width = renderer.getUiTextWidth("CrossPoint", BOLD);
|
||||
renderer.drawUiText((pageWidth - width)/ 2, pageHeight / 2 + 100, "CrossPoint", true, BOLD);
|
||||
renderer.drawUiText((pageWidth - width)/ 2, pageHeight / 2 + 70, "CrossPoint", true, BOLD);
|
||||
const int bootingWidth = renderer.getSmallTextWidth("SLEEPING");
|
||||
renderer.drawSmallText((pageWidth - bootingWidth) / 2, pageHeight / 2 + 125, "SLEEPING");
|
||||
renderer.drawSmallText((pageWidth - bootingWidth) / 2, pageHeight / 2 + 95, "SLEEPING");
|
||||
renderer.invertScreen();
|
||||
renderer.flushDisplay(EInkDisplay::HALF_REFRESH);
|
||||
renderer.flushDisplay(EInkDisplay::FULL_REFRESH);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user