mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2025-12-19 15:47:40 +03:00
## Summary
* This PR drastically reshapes the structure of the codebase, moving
from the concept of "Screens" to "Activities", restructing the files and
setting up the concept of subactivities.
* This should help with keep the main file clean and containing all
functional logic in the relevant activity.
* CrossPointState is now also a global singleton which should help with
accessing it from within activities.
## Additional Context
* This is probably going to be a bit disruptive for people with open
PRs, sorry 😞
19 lines
643 B
C++
19 lines
643 B
C++
#include "BootActivity.h"
|
|
|
|
#include <GfxRenderer.h>
|
|
|
|
#include "config.h"
|
|
#include "images/CrossLarge.h"
|
|
|
|
void BootActivity::onEnter() {
|
|
const auto pageWidth = GfxRenderer::getScreenWidth();
|
|
const auto pageHeight = GfxRenderer::getScreenHeight();
|
|
|
|
renderer.clearScreen();
|
|
renderer.drawImage(CrossLarge, (pageWidth - 128) / 2, (pageHeight - 128) / 2, 128, 128);
|
|
renderer.drawCenteredText(UI_FONT_ID, pageHeight / 2 + 70, "CrossPoint", true, BOLD);
|
|
renderer.drawCenteredText(SMALL_FONT_ID, pageHeight / 2 + 95, "BOOTING");
|
|
renderer.drawCenteredText(SMALL_FONT_ID, pageHeight - 30, CROSSPOINT_VERSION);
|
|
renderer.displayBuffer();
|
|
}
|