Initial improvements to fix viewport icon selection and draw order (#6284)
* wip fixes for entity viewport icons displaying in the correct order and handling selection correctly Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * add additional comment about z value Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * move manual sorting and some small tidy-up Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update comment Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * updates following initial round of PR feedback Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * additional changes to support tests for entity icon intersection Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * add support to enable/disable icons separately from helpers Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * final tests added and small tidy-up to display EntityId correctly Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update some manipulator test framework calls after utility functions were moved Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * fix for implicit cast Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * move icon scale values to AZ_CVARS Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * fix failing tests caught in AR and update some naming conventions for tests Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update naming convention for members of ProjectedViewportRay Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update other references to ProjectedViewportRay Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update more references to ProjectedViewportRay change Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * update menus for python tests Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
df8326a1b0
commit
d065eb9498
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
|
||||
#include "AzManipulatorTestFrameworkTestFixtures.h"
|
||||
|
||||
#include <AzToolsFramework/Viewport/ViewportTypes.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorDefaultSelection.h>
|
||||
#include <AzToolsFramework/ViewportSelection/EditorInteractionSystemViewportSelectionRequestBus.h>
|
||||
|
||||
@@ -34,8 +36,8 @@ namespace UnitTest
|
||||
TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportLeftMouseClick)
|
||||
{
|
||||
// given a left mouse down ray in world space
|
||||
auto event =
|
||||
AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent(
|
||||
m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
|
||||
// consume the mouse down and up events
|
||||
AzManipulatorTestFramework::DispatchMouseInteractionEvent(event);
|
||||
@@ -53,8 +55,8 @@ namespace UnitTest
|
||||
TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportMouseMoveHover)
|
||||
{
|
||||
// given a left mouse down ray in world space
|
||||
const auto event =
|
||||
AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Move);
|
||||
const auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent(
|
||||
m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Move);
|
||||
|
||||
// consume the mouse move event
|
||||
AzManipulatorTestFramework::DispatchMouseInteractionEvent(event);
|
||||
@@ -72,8 +74,8 @@ namespace UnitTest
|
||||
TEST_F(AzManipulatorTestFrameworkBusCallTestFixture, ConsumeViewportMouseMoveActive)
|
||||
{
|
||||
// given a left mouse down ray in world space
|
||||
auto event =
|
||||
AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent(
|
||||
m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
|
||||
// consume the mouse down event
|
||||
AzManipulatorTestFramework::DispatchMouseInteractionEvent(event);
|
||||
@@ -113,8 +115,8 @@ namespace UnitTest
|
||||
});
|
||||
|
||||
// given a left mouse down ray in world space
|
||||
auto event =
|
||||
AzManipulatorTestFramework::CreateMouseInteractionEvent(m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
auto event = AzToolsFramework::ViewportInteraction::BuildMouseInteractionEvent(
|
||||
m_interaction, AzToolsFramework::ViewportInteraction::MouseEvent::Down);
|
||||
|
||||
// consume the mouse down event
|
||||
AzManipulatorTestFramework::DispatchMouseInteractionEvent(event);
|
||||
|
||||
Reference in New Issue
Block a user