From 8805b1fe27344e8086cebabf869b7a02d2376f05 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 7 Jun 2022 19:45:17 +0200 Subject: refactor: decouple statusline from scene & cursor controller Might be slightly slower than previously though... --- src/engine/graphics/component_renderer.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/engine/graphics/component_renderer.hpp (limited to 'src/engine/graphics/component_renderer.hpp') diff --git a/src/engine/graphics/component_renderer.hpp b/src/engine/graphics/component_renderer.hpp new file mode 100644 index 0000000..4f53e07 --- /dev/null +++ b/src/engine/graphics/component_renderer.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include "interfaces/component.hpp" +#include "interfaces/component_renderer.hpp" +#include "interfaces/cursor.hpp" + +#include "engine/data/vector2.hpp" + +#include + +class ComponentRenderer : public IComponentRenderer +{ +public: + explicit ComponentRenderer( + std::shared_ptr cursor_controller) noexcept; + + void render( + const std::shared_ptr &component, + const Vector2 &position) noexcept override; + +private: + std::shared_ptr _cursor_controller; +}; -- cgit v1.2.3-18-g5258