From fb080f6fb911b1831c176a06259e384772541dd5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 2 May 2022 22:36:21 +0200 Subject: refactor: seperate statusline related concerns --- src/game/status_manager.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/game/status_manager.hpp (limited to 'src/game/status_manager.hpp') diff --git a/src/game/status_manager.hpp b/src/game/status_manager.hpp new file mode 100644 index 0000000..62b5bc7 --- /dev/null +++ b/src/game/status_manager.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "interfaces/generation_tracker.hpp" +#include "interfaces/status_manager.hpp" +#include "interfaces/statusline.hpp" +#include "interfaces/subscriber.hpp" + +#include "engine/data/vector2.hpp" + +#include +#include + +class StatusManager : public IStatusManager +{ +public: + explicit StatusManager(std::shared_ptr statusline) noexcept; + + void set_section_title( + const StatusLineSection §ion, + const std::string_view &title + ) noexcept override; + + void set_section_body( + const StatusLineSection §ion, + const std::string_view &body + ) noexcept override; + +private: + std::shared_ptr _statusline; + + std::unordered_map _title_lengths; +}; -- cgit v1.2.3-18-g5258