blob: ff1bc4757ea757e376b039f80e6f4e5d87c58628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include "interfaces/component.hpp"
#include "interfaces/component_renderer.hpp"
#include "interfaces/cursor.hpp"
#include "engine/data/vector2.hpp"
#include <memory>
constexpr auto SET_BOLD_MODE = "{esc}[1m";
class ComponentRenderer : public IComponentRenderer
{
public:
explicit ComponentRenderer(
std::shared_ptr<ICursorController> cursor_controller) noexcept;
void render(
const std::shared_ptr<IComponent> &component,
const Vector2 &position) noexcept override;
private:
std::shared_ptr<ICursorController> _cursor_controller;
static void
_use_component_colors(const std::shared_ptr<IComponent> &component) noexcept;
};
|