aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/scene.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-02-27 17:12:49 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:53 +0200
commitfe79577396231f2edb7927f1f61ce814f03851a7 (patch)
treed353a1caa449ec772dcf9a8681084fc2d6e64116 /src/engine/graphics/scene.hpp
parent6964d48c970e5f7b11897096c816271785af23ac (diff)
add basic engine graphics
Diffstat (limited to 'src/engine/graphics/scene.hpp')
-rw-r--r--src/engine/graphics/scene.hpp31
1 files changed, 31 insertions, 0 deletions
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 <fmt/core.h>
+#include <string_view>
+
+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<IScene, Scene, IMatrixFactory<std::string_view>>
+{
+public:
+ explicit Scene(IMatrixFactory<std::string_view> matrix_factory);
+
+ void enter() override;
+
+ void leave() override;
+
+ // void do_in_statusbar(const std::function<void()> &routine);
+
+private:
+ bool _is_shown;
+
+ IMatrixFactory<std::string_view> _matrix_factory;
+};