Implement Wiggle Title Text
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "../include/asset_mgr.hpp"
|
||||
#include "include/font_writer.hpp"
|
||||
#include "include/paco.hpp"
|
||||
#include <FontWriter/fonts.hpp>
|
||||
#include <FontWriter/font_writer.hpp>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace JabyEngine;
|
||||
@@ -10,14 +13,22 @@ static object::Paco paco;
|
||||
|
||||
static void setup() {
|
||||
Assets::Main::load();
|
||||
FontWriter::setup();
|
||||
paco.setup();
|
||||
}
|
||||
|
||||
static void update() {
|
||||
static const char Title[] = "Pool Box";
|
||||
static constexpr auto TitleLength = (sizeof(Title) - 1)*DefaultFont::Info.font_size.width;
|
||||
|
||||
auto cursor = FontWriter::update(JabyEngine::Make::PositionI16((GPU::Display::Width-TitleLength)/2, 16));
|
||||
paco.update();
|
||||
|
||||
FontWriter::new_font_writer.write(cursor, Title, GPU::Color24::Yellow(), &FontWriter::wiggle);
|
||||
}
|
||||
|
||||
static void render() {
|
||||
FontWriter::new_font_writer.render();
|
||||
paco.render();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user