Skip to content

Commit 56a1200

Browse files
committed
Fixed hand cursor not resetting properly in controllable views
1 parent 14f75cc commit 56a1200

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/OvEditor/src/OvEditor/Core/CameraController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,6 @@ std::optional<std::reference_wrapper<OvCore::ECS::Actor>> OvEditor::Core::Camera
290290

291291
void OvEditor::Core::CameraController::HandleCameraPanning(const OvMaths::FVector2& p_mouseOffset, bool p_firstMouset)
292292
{
293-
m_window.SetCursorShape(OvWindowing::Cursor::ECursorShape::HAND);
294-
295293
auto mouseOffset = p_mouseOffset * m_cameraDragSpeed;
296294

297295
m_camera.SetPosition(m_camera.GetPosition() + m_camera.transform->GetWorldRight() * mouseOffset.x);
@@ -411,6 +409,7 @@ void OvEditor::Core::CameraController::HandleMousePressed()
411409

412410
if (m_inputManager.IsMouseButtonPressed(OvWindowing::Inputs::EMouseButton::MOUSE_BUTTON_MIDDLE))
413411
{
412+
m_window.SetCursorShape(OvWindowing::Cursor::ECursorShape::HAND);
414413
m_middleMousePressed = true;
415414
}
416415

@@ -433,6 +432,7 @@ void OvEditor::Core::CameraController::HandleMouseReleased()
433432
{
434433
m_middleMousePressed = false;
435434
m_firstMouse = true;
435+
m_window.SetCursorShape(OvWindowing::Cursor::ECursorShape::ARROW);
436436
}
437437

438438
if (m_rightMousePressed && m_inputManager.IsMouseButtonReleased(OvWindowing::Inputs::EMouseButton::MOUSE_BUTTON_RIGHT))

0 commit comments

Comments
 (0)