From 741a6008e806abb8e5aaa8f8fb91827fa97ece9d Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 2 May 2022 22:57:51 +0200 Subject: refactor: move statusline to engine graphics folder --- src/game/statusline.hpp | 50 ------------------------------------------------- 1 file changed, 50 deletions(-) delete mode 100644 src/game/statusline.hpp (limited to 'src/game/statusline.hpp') diff --git a/src/game/statusline.hpp b/src/game/statusline.hpp deleted file mode 100644 index 181090d..0000000 --- a/src/game/statusline.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#pragma once - -#include "interfaces/cursor.hpp" -#include "interfaces/statusline.hpp" -#include "interfaces/window.hpp" - -#include "engine/data/vector2.hpp" - -#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( - 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; - - std::shared_ptr _cursor_controller; - std::shared_ptr _window; - - auto _move_to_statusline(int32_t x) noexcept -> Vector2; - - void _move_back(Vector2 previous_position) noexcept; - - [[nodiscard]] auto _get_section_start_x(const StatusLineSection §ion - ) const noexcept -> int32_t; - - void _clear_section(const StatusLineSection §ion, std::size_t start) noexcept; -}; -- cgit v1.2.3-18-g5258