From 7de921836587cdc359c2c4b84ed6446ada16c008 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 22 May 2022 17:05:00 +0200 Subject: refactor: remove window class --- src/engine/graphics/statusline.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/engine/graphics/statusline.cpp') 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 cursor_controller, - std::shared_ptr window) noexcept - : _cursor_controller(std::move(cursor_controller)), _window(std::move(window)) + std::shared_ptr 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(window_size.get_height()); + auto scene_height = static_cast(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; } -- cgit v1.2.3-18-g5258