aboutsummaryrefslogtreecommitdiff
path: root/src/game/status_manager.hpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-08 16:06:03 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:57:01 +0200
commit3f9004b598fc8006576db9b8d2ae4e080101101b (patch)
tree97108db2a08253417139bd76741add2dd126f58d /src/game/status_manager.hpp
parent2d9661790db30eb169d07d36b485943c598253b9 (diff)
refactor: give game responsibility of statusline
Diffstat (limited to 'src/game/status_manager.hpp')
-rw-r--r--src/game/status_manager.hpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/game/status_manager.hpp b/src/game/status_manager.hpp
index 245e888..85faf3c 100644
--- a/src/game/status_manager.hpp
+++ b/src/game/status_manager.hpp
@@ -1,20 +1,19 @@
#pragma once
-#include "interfaces/generation_tracker.hpp"
#include "interfaces/status_manager.hpp"
#include "interfaces/statusline.hpp"
-#include "engine/data/vector2.hpp"
+#include <yacppdic/auto_wirable.hpp>
#include <memory>
+#include <string_view>
#include <unordered_map>
-class StatusManager : public IStatusManager
+class StatusManager : public IStatusManager,
+ public yacppdic::AutoWirable<IStatusManager, StatusManager>
{
public:
- explicit StatusManager(std::shared_ptr<IStatusLine> statusline) noexcept;
-
- void initialize() noexcept override;
+ void bind(const std::shared_ptr<IStatusLine> &statusline) noexcept override;
void set_section_title(
const StatusLineSection &section,
@@ -24,8 +23,6 @@ public:
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;