Expose sticky select option to the SettingsRegistry and disable by default (#4149)

* expose sticky select option to the SettingsRegistry

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* update missed callsites after API change to Manipulator Test Framework

Signed-off-by: hultonha <hultonha@amazon.co.uk>

* updates following review feedback

Signed-off-by: hultonha <hultonha@amazon.co.uk>
This commit is contained in:
hultonha
2021-09-16 09:14:37 +01:00
committed by GitHub
parent a8908a987a
commit 7e85b1512a
19 changed files with 275 additions and 182 deletions
@@ -76,7 +76,7 @@ namespace UnitTest
linearManipulator->SetLocalPosition(action.LocalPosition());
});
m_actionDispatcher->EnableSnapToGrid()
m_actionDispatcher->SetSnapToGrid(true)
->GridSize(5.0f)
->CameraState(m_cameraState)
->MousePosition(initialPositionScreen)
@@ -114,7 +114,7 @@ namespace UnitTest
manipulator->SetLocalPosition(action.LocalPosition());
});
actionDispatcher->EnableSnapToGrid()
actionDispatcher->SetSnapToGrid(true)
->GridSize(1.0f)
->CameraState(cameraState)
->MousePosition(initialPositionScreen)
@@ -48,7 +48,7 @@ namespace UnitTest
{
bool snapping = false;
m_viewportInteraction->EnableGridSnaping();
m_viewportInteraction->SetGridSnapping(true);
AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::EventResult(
snapping, m_viewportInteraction->GetViewportId(),
&AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::GridSnappingEnabled);
@@ -60,7 +60,7 @@ namespace UnitTest
{
bool snapping = true;
m_viewportInteraction->DisableGridSnaping();
m_viewportInteraction->SetGridSnapping(false);
AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::EventResult(
snapping, m_viewportInteraction->GetViewportId(),
&AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::GridSnappingEnabled);
@@ -75,7 +75,7 @@ namespace UnitTest
m_viewportInteraction->SetGridSize(expectedGridSize);
m_viewportInteraction->DisableGridSnaping();
m_viewportInteraction->SetGridSnapping(false);
AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::EventResult(
gridSize, m_viewportInteraction->GetViewportId(),
&AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::GridSize);
@@ -87,7 +87,7 @@ namespace UnitTest
{
bool snapping = false;
m_viewportInteraction->EnableAngularSnaping();
m_viewportInteraction->SetAngularSnapping(true);
AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::EventResult(
snapping, m_viewportInteraction->GetViewportId(),
&AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::AngleSnappingEnabled);
@@ -99,7 +99,7 @@ namespace UnitTest
{
bool snapping = true;
m_viewportInteraction->DisableAngularSnaping();
m_viewportInteraction->SetAngularSnapping(false);
AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::EventResult(
snapping, m_viewportInteraction->GetViewportId(),
&AzToolsFramework::ViewportInteraction::ViewportSettingsRequestBus::Events::AngleSnappingEnabled);