From fe79577396231f2edb7927f1f61ce814f03851a7 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 27 Feb 2022 17:12:49 +0100 Subject: add basic engine graphics --- src/engine/graphics/scene.hpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/engine/graphics/scene.hpp (limited to 'src/engine/graphics/scene.hpp') diff --git a/src/engine/graphics/scene.hpp b/src/engine/graphics/scene.hpp new file mode 100644 index 0000000..b26ac05 --- /dev/null +++ b/src/engine/graphics/scene.hpp @@ -0,0 +1,31 @@ +#pragma once + +#include "DI/auto_wirable.hpp" +#include "interfaces/matrix.hpp" +#include "interfaces/scene.hpp" + +#include +#include + +constexpr fmt::string_view ESC = "\x1B"; + +constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h"; +constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l"; + +class Scene : public IScene, + public AutoWirable> +{ +public: + explicit Scene(IMatrixFactory matrix_factory); + + void enter() override; + + void leave() override; + + // void do_in_statusbar(const std::function &routine); + +private: + bool _is_shown; + + IMatrixFactory _matrix_factory; +}; -- cgit v1.2.3-18-g5258