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
@@ -8,9 +8,9 @@
|
||||
|
||||
#include <Tests/FocusMode/EditorFocusModeFixture.h>
|
||||
|
||||
namespace AzToolsFramework
|
||||
namespace UnitTest
|
||||
{
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_SetFocus)
|
||||
TEST_F(EditorFocusModeFixture, SetFocus)
|
||||
{
|
||||
// When an entity is set as the focus root, GetFocusRoot should return its EntityId.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]);
|
||||
@@ -20,7 +20,7 @@ namespace AzToolsFramework
|
||||
m_focusModeInterface->ClearFocusRoot(m_editorEntityContextId);
|
||||
}
|
||||
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_ClearFocus)
|
||||
TEST_F(EditorFocusModeFixture, ClearFocus)
|
||||
{
|
||||
// Change the value from the default.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]);
|
||||
@@ -30,7 +30,7 @@ namespace AzToolsFramework
|
||||
EXPECT_EQ(m_focusModeInterface->GetFocusRoot(m_editorEntityContextId), AZ::EntityId());
|
||||
}
|
||||
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_AncestorsDescendants)
|
||||
TEST_F(EditorFocusModeFixture, IsInFocusSubTreeAncestorsDescendants)
|
||||
{
|
||||
// When the focus is set to an entity, all its descendants are in the focus subtree while the ancestors aren't.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[StreetEntityName]);
|
||||
@@ -43,7 +43,7 @@ namespace AzToolsFramework
|
||||
EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true);
|
||||
}
|
||||
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Siblings)
|
||||
TEST_F(EditorFocusModeFixture, IsInFocusSubTreeSiblings)
|
||||
{
|
||||
// If the root entity has siblings, they are also outside of the focus subtree.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[CarEntityName]);
|
||||
@@ -56,7 +56,7 @@ namespace AzToolsFramework
|
||||
EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), false);
|
||||
}
|
||||
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Leaf)
|
||||
TEST_F(EditorFocusModeFixture, IsInFocusSubTreeLeaf)
|
||||
{
|
||||
// If the root is a leaf, then the focus subtree will consists of just that entity.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[Passenger2EntityName]);
|
||||
@@ -69,7 +69,7 @@ namespace AzToolsFramework
|
||||
EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true);
|
||||
}
|
||||
|
||||
TEST_F(EditorFocusModeFixture, EditorFocusModeTests_IsInFocusSubTree_Clear)
|
||||
TEST_F(EditorFocusModeFixture, IsInFocusSubTreeClear)
|
||||
{
|
||||
// Change the value from the default.
|
||||
m_focusModeInterface->SetFocusRoot(m_entityMap[StreetEntityName]);
|
||||
@@ -84,4 +84,4 @@ namespace AzToolsFramework
|
||||
EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[SportsCarEntityName]), true);
|
||||
EXPECT_EQ(m_focusModeInterface->IsInFocusSubTree(m_entityMap[Passenger2EntityName]), true);
|
||||
}
|
||||
}
|
||||
} // namespace UnitTest
|
||||
|
||||
Reference in New Issue
Block a user