From 3f9004b598fc8006576db9b8d2ae4e080101101b Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 8 Jun 2022 16:06:03 +0200 Subject: refactor: give game responsibility of statusline --- src/game/status_manager.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/game/status_manager.cpp') diff --git a/src/game/status_manager.cpp b/src/game/status_manager.cpp index c7d80e9..b4496ba 100644 --- a/src/game/status_manager.cpp +++ b/src/game/status_manager.cpp @@ -4,14 +4,10 @@ #include -StatusManager::StatusManager(std::shared_ptr statusline) noexcept - : _statusline(std::move(statusline)) - +void StatusManager::bind(const std::shared_ptr &statusline) noexcept { -} + _statusline = statusline; -void StatusManager::initialize() noexcept -{ _statusline->set_section_length(StatusLineSection::A, 5); _statusline->set_section_length(StatusLineSection::B, 15); _statusline->set_section_length(StatusLineSection::C, 15); @@ -46,7 +42,3 @@ void StatusManager::set_section_body( _statusline->set_status(section, body, section_title_length + 1); } -auto StatusManager::get_statusline() const noexcept -> std::shared_ptr -{ - return _statusline; -} -- cgit v1.2.3-18-g5258