Skip to content
anthony.samms edited this page May 28, 2026 · 1 revision

This document serves as an overview for the scene system. This is a header only library.

To create a screen, it must be manually added in the Screens enum. it also needs to be added to the inline function screens_to_string.

in the YataiDON, the screen should be included and added to the LoopState, to the screens map as a std::unique_ptr. Screen logic should not occur upon initialization.

void on_screen_start();

Runs for the first time after switching to said screen. By default, this will load all textures and sounds corresponding to the name of the screen.

Screens on_screen_end(Screens next_screen)

Runs before switching to the next screen. This unloads all sounds and textures corresponding to the name of the screen.

std::optional<Screens> update()

Runs on every frame. Contains non drawing code.

void draw()

Runs on every frame. contains drawing code.

Clone this wiki locally