aboutsummaryrefslogtreecommitdiff
path: root/src/game/status_manager.hpp
blob: 245e888ca5bd409b8c40499d030eec39566f9460 (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
29
30
31
32
33
#pragma once

#include "interfaces/generation_tracker.hpp"
#include "interfaces/status_manager.hpp"
#include "interfaces/statusline.hpp"

#include "engine/data/vector2.hpp"

#include <memory>
#include <unordered_map>

class StatusManager : public IStatusManager
{
public:
	explicit StatusManager(std::shared_ptr<IStatusLine> statusline) noexcept;

	void initialize() noexcept override;

	void set_section_title(
		const StatusLineSection &section,
		const std::string_view &title) noexcept override;

	void set_section_body(
		const StatusLineSection &section,
		const std::string_view &body) noexcept override;

	auto get_statusline() const noexcept -> std::shared_ptr<IStatusLine> override;

private:
	std::shared_ptr<IStatusLine> _statusline;

	std::unordered_map<StatusLineSection, int32_t> _title_lengths;
};