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/commands/move_cursor.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/commands/move_cursor.cpp') diff --git a/src/commands/move_cursor.cpp b/src/commands/move_cursor.cpp index 12a247d..6bd8eda 100644 --- a/src/commands/move_cursor.cpp +++ b/src/commands/move_cursor.cpp @@ -3,8 +3,8 @@ MoveCursorCommand::MoveCursorCommand( const Vector2 &direction, const std::shared_ptr &cursor_controller, - const std::shared_ptr &window) noexcept - : _direction(direction), _cursor_controller(cursor_controller), _window(window) + const std::shared_ptr &scene) noexcept + : _direction(direction), _cursor_controller(cursor_controller), _scene(scene) { } @@ -16,9 +16,9 @@ void MoveCursorCommand::execute() noexcept const auto new_position = _cursor_controller->where().to_direction(_direction, amount); - const auto window_size = _window->size(); + const auto scene_size = _scene->size(); - if (window_size.validate_coords(new_position) != CoordsValidation::VALID) + if (scene_size.validate_coords(new_position) != CoordsValidation::VALID) { return; } -- cgit v1.2.3-18-g5258