Files

39 lines
1.6 KiB
C++
Raw Permalink Normal View History

// Cyberpunk-style animated pages for the ESPHome display: a netrunner HUD, a
// self-solving breach protocol, an optics boot-and-scan sequence, and a HUD
// with a small breach matrix. Inspired by the look of Cyberpunk 2077; the
// layouts and graphics are drawn from scratch, no game assets are used.
//
// Each function draws a whole page. Call it from a page lambda and list that
// page under animated_pages: the animation clock is the display's
// page_age_ms(), so every page starts its intro when it is shown.
#pragma once
2026-10-18 23:46:24 +02:00
#include "el512_pages.h"
#include "esphome/components/display/display.h"
#include "esphome/core/time.h"
namespace esphome::el512 {
class EL512Display;
namespace cyber {
2026-10-18 23:46:24 +02:00
using el512::HomeData;
using el512::Reading;
struct Fonts {
display::BaseFont *title{nullptr}; // wide display face for headers (Orbitron)
display::BaseFont *label{nullptr}; // condensed labels (Rajdhani)
display::BaseFont *value{nullptr}; // condensed readouts (Rajdhani bold)
display::BaseFont *huge{nullptr}; // clock digits (Rajdhani bold)
display::BaseFont *mono{nullptr}; // small monospace for logs and tickers (Share Tech Mono)
display::BaseFont *code{nullptr}; // larger monospace for breach codes (Share Tech Mono)
};
void netrunner_hud(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void breach_protocol(EL512Display &it, const Fonts &f);
void optics_scan(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
void split_hud(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now);
} // namespace cyber
} // namespace esphome::el512