// KonoSuba-themed animated pages for the ESPHome display: Megumin's daily // explosion, the Adventurers' Guild quest board, Megumin's adventurer card and // a party battle against a giant toad. Fan art: the pixel art // (konosuba_sprites.h, from tools/konosuba_sprites.py) and all texts are // original; no material from the series is 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(). #pragma once #include "el512_pages.h" #include "esphome/components/display/display.h" #include "esphome/core/time.h" namespace esphome::el512 { class EL512Display; namespace konosuba { struct Fonts { display::BaseFont *title{nullptr}; // fantasy serif headers (Cinzel) display::BaseFont *big{nullptr}; // "EXPLOSION!" (Cinzel Decorative) display::BaseFont *text{nullptr}; // rounded body text (Nunito) display::BaseFont *pixel{nullptr}; // 8 px pixel font (Press Start 2P) display::BaseFont *pixel_l{nullptr}; // 16 px pixel font display::BaseFont *jp{nullptr}; // a few Japanese words (Noto Sans JP) display::BaseFont *jp_big{nullptr}; // 爆裂魔法 (Dela Gothic One) display::BaseFont *weather{nullptr}; // weather icons (Material Design Icons) }; void explosion(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now); void guild_board(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now); void adventurer_card(EL512Display &it, const Fonts &f, const HomeData &d, ESPTime now); void party_battle(EL512Display &it, const Fonts &f, const HomeData &d); // Explosions cast on the Explosion page since midnight. uint32_t explosions_today(); } // namespace konosuba } // namespace esphome::el512