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/interfaces/component_renderer.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/interfaces/component_renderer.hpp (limited to 'src/interfaces/component_renderer.hpp') diff --git a/src/interfaces/component_renderer.hpp b/src/interfaces/component_renderer.hpp new file mode 100644 index 0000000..fa8bc18 --- /dev/null +++ b/src/interfaces/component_renderer.hpp @@ -0,0 +1,24 @@ +#pragma once + +#include "interfaces/component.hpp" +#include "interfaces/cursor.hpp" + +#include "engine/data/vector2.hpp" + +#include + +#include + +// NOLINTNEXTLINE(cppcoreguidelines-special-member-functions) +class IComponentRenderer +{ +public: + virtual ~IComponentRenderer() = default; + + virtual void render( + const std::shared_ptr &component, + const Vector2 &position) noexcept = 0; +}; + +using IComponentRendererFactory = yacppdic::Factory( + const std::shared_ptr &)>; -- cgit v1.2.3-18-g5258