Support Version number and change font to BIOS for ControllerTest

This commit is contained in:
2024-01-05 13:35:37 -06:00
parent 60aa84ef28
commit 111a42a7e1
3 changed files with 23 additions and 6 deletions

View File

@@ -86,14 +86,17 @@ static void setup() {
namespace NormalScene {
static void update() {
static const char Title[] = "Pool Box";
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.get_font_size().width;
static const char Title[] = "Pool Box";
static const char Version[] = "Ver. 0.8";
static constexpr auto TitleLength = DefaultFont::Info.estimate_str_render_length(Title);
static constexpr auto VersionLength = DefaultFont::Info.estimate_str_render_length(Version);
Periphery::query_controller();
auto cursor = FontWriter::update(JabyEngine::Make::PositionI16((GPU::Display::Width-TitleLength)/2, 16));
auto cursor = FontWriter::update(Make::PositionI16((GPU::Display::Width-TitleLength)/2, 16));
paco.update();
FontWriter::new_font_writer.write(cursor, Title, GPU::Color24::Yellow(0xD0), &FontWriter::wiggle);
FontWriter::new_font_writer.write(cursor.change_position(Make::PositionI16((GPU::Display::Width-VersionLength)/2, 16 + DefaultFont::Info.get_kern_size().height)), Version, GPU::Color24::Green(0xD0), &FontWriter::wiggle);
menu.update(FontWriter::bios_font_writer, cursor, Make::PositionI16(8, 64));
}