#include "scene.hpp" #include "engine/escape.hpp" #include #include Scene::Scene(IMatrixFactory matrix_factory) : _is_shown(false), _matrix_factory(matrix_factory) { } void Scene::enter() { if (_is_shown) { return; } fmt::print(ENABLE_ALT_BUFFER, fmt::arg("esc", ESC)); std::cout.flush(); _is_shown = true; } void Scene::leave() { if (!_is_shown) { return; } fmt::print(DISABLE_ALT_BUFFER, fmt::arg("esc", ESC)); std::cout.flush(); _is_shown = false; }