/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include namespace UnitTest { class EditorFocusModeSelectionFixture : public IndirectCallManipulatorViewportInteractionFixtureMixin { public: void SetUpEditorFixtureImpl() override { IndirectCallManipulatorViewportInteractionFixtureMixin::SetUpEditorFixtureImpl(); m_viewportManipulatorInteraction->GetViewportInteraction().SetIconsVisible(false); } void ClickAtWorldPositionOnViewport(const AZ::Vector3& worldPosition) { // Calculate the world position in screen space const auto carScreenPosition = AzFramework::WorldToScreen(worldPosition, m_cameraState); // Click the entity in the viewport m_actionDispatcher->CameraState(m_cameraState)->MousePosition(carScreenPosition)->MouseLButtonDown()->MouseLButtonUp(); } }; } // namespace UnitTest