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/statusline.hpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/game/statusline.hpp') diff --git a/src/game/statusline.hpp b/src/game/statusline.hpp index 66ce2c4..7883051 100644 --- a/src/game/statusline.hpp +++ b/src/game/statusline.hpp @@ -25,10 +25,14 @@ public: void initialize_background() noexcept override; void set_status( - StatusLineSection section, - const std::string_view &status_str + const StatusLineSection §ion, + const std::string_view &status, + std::size_t start ) noexcept override; + void set_section_length(const StatusLineSection §ion, uint32_t length) noexcept + override; + private: std::unordered_map _sections_lengths; @@ -39,8 +43,8 @@ private: void _move_back(Vector2 previous_position) noexcept; - [[nodiscard]] auto _get_section_start_x(StatusLineSection section) const noexcept - -> int32_t; + [[nodiscard]] auto _get_section_start_x(const StatusLineSection §ion + ) const noexcept -> int32_t; - void _clear_section(StatusLineSection section) noexcept; + void _clear_section(const StatusLineSection §ion, std::size_t start) noexcept; }; -- cgit v1.2.3-18-g5258