diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-02 22:36:21 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | fb080f6fb911b1831c176a06259e384772541dd5 (patch) | |
tree | e18140e700cd974f84a5630f41fcb0b496b7e772 /src/game/statusline.hpp | |
parent | 40d02748924aa7c48b04cf948204d8dacdfbbc74 (diff) |
refactor: seperate statusline related concerns
Diffstat (limited to 'src/game/statusline.hpp')
-rw-r--r-- | src/game/statusline.hpp | 14 |
1 files changed, 9 insertions, 5 deletions
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<StatusLineSection, uint32_t> _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; }; |