aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/scene.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/graphics/scene.hpp')
-rw-r--r--src/engine/graphics/scene.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/engine/graphics/scene.hpp b/src/engine/graphics/scene.hpp
index 60b541a..c2b11e8 100644
--- a/src/engine/graphics/scene.hpp
+++ b/src/engine/graphics/scene.hpp
@@ -1,14 +1,19 @@
#pragma once
+#include "interfaces/component.hpp"
#include "interfaces/cursor.hpp"
#include "interfaces/matrix.hpp"
#include "interfaces/scene.hpp"
+#include "engine/data/vector2.hpp"
+
#include <fmt/core.h>
#include <memory>
#include <string_view>
#include <termios.h>
+#include <utility>
+#include <vector>
constexpr fmt::string_view ENABLE_ALT_BUFFER = "{esc}[?1049h";
constexpr fmt::string_view DISABLE_ALT_BUFFER = "{esc}[?1049l";
@@ -29,10 +34,19 @@ public:
[[nodiscard]] auto get_matrix() const noexcept
-> const std::shared_ptr<IMatrix<MatrixElement>> & override;
+ void register_component(
+ const std::shared_ptr<IComponent> &component,
+ const Vector2 &position) noexcept override;
+
+ [[nodiscard]] auto get_components() const noexcept
+ -> std::vector<std::pair<std::shared_ptr<IComponent>, Vector2>> override;
+
private:
std::shared_ptr<IMatrix<MatrixElement>> _matrix;
std::shared_ptr<ICursorController> _cursor_controller;
bool _is_shown;
std::shared_ptr<termios> _original_termios = nullptr;
+
+ std::vector<std::pair<std::shared_ptr<IComponent>, Vector2>> _components;
};