#pragma once #include "interfaces/cursor.hpp" #include "interfaces/statusline.hpp" #include "interfaces/window.hpp" #include "engine/data/vector2.hpp" #include #include #include #include #include constexpr uint32_t STATUSBAR_COLOR = 0x1A1A1AU; class StatusLine : public IStatusLine { public: StatusLine(std::shared_ptr cursor_controller, std::shared_ptr window) noexcept; void initialize_background() noexcept override; void set_status(StatusLineSection section, const std::string_view &str) noexcept override; private: std::unordered_map _sections_lengths; std::shared_ptr _cursor_controller; std::shared_ptr _window; Vector2 _move_to_statusline(int32_t x) noexcept; void _move_back(Vector2 previous_position) noexcept; int32_t _get_section_start_x(StatusLineSection section) const noexcept; void _clear_section(StatusLineSection section) noexcept; };