11 DebugBanner* DebugBanner::banner =
nullptr;
13 DebugBanner::DebugBanner()
21 void DebugBanner::display(
const std::string& m,
float time) {
22 auto& t = banner->text;
24 if (t.entity() == bl::ecs::InvalidEntity) {
25 t.create(*banner->engine, Properties::MenuFont(), m, 20, sf::Color::Cyan);
26 t.getSection().setOutlineColor(sf::Color::Black);
27 t.getSection().setOutlineThickness(2.f);
29 else { t.getSection().setString(m); }
31 t.getTransform().setPosition(
32 static_cast<float>(Properties::WindowWidth() - t.getLocalBounds().width - 10.f), 10.f);
33 t.addToScene(banner->engine->renderer().getObserver().getOrCreateSceneOverlay(),
34 bl::rc::UpdateSpeed::Static);
35 banner->timeout = time;
36 banner->displayTime = 0.f;
37 banner->showing =
true;
40 void DebugBanner::init(bl::engine::Engine& e) { engine = &e; }
42 void DebugBanner::update(std::mutex&,
float dt,
float,
float,
float) {
45 if (displayTime >= timeout) {
47 text.removeFromScene();
Core classes and functionality for both the editor and game.