aboutsummaryrefslogtreecommitdiff
path: root/src/engine/graphics/statusline.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-22 17:05:00 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:59 +0200
commit7de921836587cdc359c2c4b84ed6446ada16c008 (patch)
treec4ec20b4769817c41ce7d939956da297bf787597 /src/engine/graphics/statusline.cpp
parent723ea6535b4c4e5605e5592137a898d6ffa458c1 (diff)
refactor: remove window class
Diffstat (limited to 'src/engine/graphics/statusline.cpp')
-rw-r--r--src/engine/graphics/statusline.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/engine/graphics/statusline.cpp b/src/engine/graphics/statusline.cpp
index 3968fae..52edd8f 100644
--- a/src/engine/graphics/statusline.cpp
+++ b/src/engine/graphics/statusline.cpp
@@ -8,8 +8,8 @@
StatusLine::StatusLine(
std::shared_ptr<ICursorController> cursor_controller,
- std::shared_ptr<IWindow> window) noexcept
- : _cursor_controller(std::move(cursor_controller)), _window(std::move(window))
+ std::shared_ptr<IScene> scene) noexcept
+ : _cursor_controller(std::move(cursor_controller)), _scene(std::move(scene))
{
}
@@ -19,7 +19,7 @@ void StatusLine::initialize_background() noexcept
auto background_color = get_background_esc_seq(STATUSBAR_COLOR);
- fmt::print("{}{}", background_color, std::string(_window->size().get_width(), ' '));
+ fmt::print("{}{}", background_color, std::string(_scene->size().get_width(), ' '));
fmt::print(RESET_ALL_MODES, fmt::arg("esc", ESC));
_move_back(previous_position);
@@ -58,13 +58,13 @@ auto StatusLine::_move_to_statusline(int32_t x) noexcept -> Vector2
{
const auto previous_position = _cursor_controller->where();
- const auto window_size = _window->size();
+ const auto scene_size = _scene->size();
_cursor_controller->hide();
- auto window_height = static_cast<Vector2::Value>(window_size.get_height());
+ auto scene_height = static_cast<Vector2::Value>(scene_size.get_height());
- _cursor_controller->move_to(Vector2({.x = x, .y = window_height}), true);
+ _cursor_controller->move_to(Vector2({.x = x, .y = scene_height}), true);
return previous_position;
}