File renames for settings updates

Merge pull request #3952 from aws-lumberyard-dev/hultonha_GH-3579_tidyup
This commit is contained in:
hultonha
2021-09-07 09:16:31 +01:00
committed by GitHub
7 changed files with 75 additions and 64 deletions
+3 -3
View File
@@ -27,8 +27,8 @@
#include "EditorPreferencesPageGeneral.h"
#include "EditorPreferencesPageFiles.h"
#include "EditorPreferencesPageViewportGeneral.h"
#include "EditorPreferencesPageViewportGizmo.h"
#include "EditorPreferencesPageViewportMovement.h"
#include "EditorPreferencesPageViewportManipulator.h"
#include "EditorPreferencesPageViewportCamera.h"
#include "EditorPreferencesPageViewportDebug.h"
#include "EditorPreferencesPageExperimentalLighting.h"
#include "EditorPreferencesPageAWS.h"
@@ -66,7 +66,7 @@ EditorPreferencesDialog::EditorPreferencesDialog(QWidget* pParent)
CEditorPreferencesPage_Files::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportGeneral::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportManipulator::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportMovement::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportCamera::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportDebug::Reflect(*serializeContext);
CEditorPreferencesPage_ExperimentalLighting::Reflect(*serializeContext);
CEditorPreferencesPage_AWS::Reflect(*serializeContext);
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "EditorPreferencesPageViewportMovement.h"
#include "EditorPreferencesPageViewportCamera.h"
#include <AzCore/std/sort.h>
#include <AzFramework/Input/Buses/Requests/InputDeviceRequestBus.h>
@@ -58,7 +58,7 @@ static AZStd::vector<AZStd::string> GetEditorInputNames()
return inputNames;
}
void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& serialize)
void CEditorPreferencesPage_ViewportCamera::Reflect(AZ::SerializeContext& serialize)
{
serialize.Class<CameraMovementSettings>()
->Version(2)
@@ -93,10 +93,10 @@ void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& seri
->Field("OrbitDolly", &CameraInputSettings::m_orbitDollyChannelId)
->Field("OrbitPan", &CameraInputSettings::m_orbitPanChannelId);
serialize.Class<CEditorPreferencesPage_ViewportMovement>()
serialize.Class<CEditorPreferencesPage_ViewportCamera>()
->Version(1)
->Field("CameraMovementSettings", &CEditorPreferencesPage_ViewportMovement::m_cameraMovementSettings)
->Field("CameraInputSettings", &CEditorPreferencesPage_ViewportMovement::m_cameraInputSettings);
->Field("CameraMovementSettings", &CEditorPreferencesPage_ViewportCamera::m_cameraMovementSettings)
->Field("CameraInputSettings", &CEditorPreferencesPage_ViewportCamera::m_cameraInputSettings);
if (AZ::EditContext* editContext = serialize.GetEditContext())
{
@@ -208,35 +208,50 @@ void CEditorPreferencesPage_ViewportMovement::Reflect(AZ::SerializeContext& seri
"Key/button to begin camera orbit pan")
->Attribute(AZ::Edit::Attributes::StringList, &GetEditorInputNames);
editContext->Class<CEditorPreferencesPage_ViewportMovement>("Viewport Preferences", "Viewport Preferences")
editContext->Class<CEditorPreferencesPage_ViewportCamera>("Viewport Preferences", "Viewport Preferences")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Visibility, AZ_CRC("PropertyVisibility_ShowChildrenOnly", 0xef428f20))
->DataElement(
AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportMovement::m_cameraMovementSettings,
AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportCamera::m_cameraMovementSettings,
"Camera Movement Settings", "Camera Movement Settings")
->DataElement(
AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportMovement::m_cameraInputSettings, "Camera Input Settings",
AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_ViewportCamera::m_cameraInputSettings, "Camera Input Settings",
"Camera Input Settings");
}
}
CEditorPreferencesPage_ViewportMovement::CEditorPreferencesPage_ViewportMovement()
CEditorPreferencesPage_ViewportCamera::CEditorPreferencesPage_ViewportCamera()
{
InitializeSettings();
m_icon = QIcon(":/res/Camera.svg");
}
const char* CEditorPreferencesPage_ViewportMovement::GetTitle()
const char* CEditorPreferencesPage_ViewportCamera::GetCategory()
{
return "Viewports";
}
const char* CEditorPreferencesPage_ViewportCamera::GetTitle()
{
return "Camera";
}
QIcon& CEditorPreferencesPage_ViewportMovement::GetIcon()
QIcon& CEditorPreferencesPage_ViewportCamera::GetIcon()
{
return m_icon;
}
void CEditorPreferencesPage_ViewportMovement::OnApply()
void CEditorPreferencesPage_ViewportCamera::OnCancel()
{
// noop
}
bool CEditorPreferencesPage_ViewportCamera::OnQueryCancel()
{
return true;
}
void CEditorPreferencesPage_ViewportCamera::OnApply()
{
SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_translateSpeed);
SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed);
@@ -271,7 +286,7 @@ void CEditorPreferencesPage_ViewportMovement::OnApply()
&SandboxEditor::EditorModularViewportCameraComposerNotificationBus::Events::OnEditorModularViewportCameraComposerSettingsChanged);
}
void CEditorPreferencesPage_ViewportMovement::InitializeSettings()
void CEditorPreferencesPage_ViewportCamera::InitializeSettings()
{
m_cameraMovementSettings.m_translateSpeed = SandboxEditor::CameraTranslateSpeed();
m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed();
@@ -19,32 +19,22 @@ inline AZ::Crc32 EditorPropertyVisibility(const bool enabled)
return enabled ? AZ::Edit::PropertyVisibility::Show : AZ::Edit::PropertyVisibility::Hide;
}
class CEditorPreferencesPage_ViewportMovement : public IPreferencesPage
class CEditorPreferencesPage_ViewportCamera : public IPreferencesPage
{
public:
AZ_RTTI(CEditorPreferencesPage_ViewportMovement, "{BC593332-7EAF-4171-8A35-1C5DE5B40909}", IPreferencesPage)
AZ_RTTI(CEditorPreferencesPage_ViewportCamera, "{BC593332-7EAF-4171-8A35-1C5DE5B40909}", IPreferencesPage)
static void Reflect(AZ::SerializeContext& serialize);
CEditorPreferencesPage_ViewportMovement();
virtual ~CEditorPreferencesPage_ViewportMovement() = default;
CEditorPreferencesPage_ViewportCamera();
virtual ~CEditorPreferencesPage_ViewportCamera() = default;
virtual const char* GetCategory() override
{
return "Viewports";
}
virtual const char* GetTitle();
virtual QIcon& GetIcon() override;
virtual void OnApply() override;
virtual void OnCancel() override
{
}
virtual bool OnQueryCancel() override
{
return true;
}
const char* GetCategory() override;
const char* GetTitle() override;
QIcon& GetIcon() override;
void OnApply() override;
void OnCancel() override;
bool OnQueryCancel() override;
private:
void InitializeSettings();
@@ -8,7 +8,7 @@
#include "EditorDefs.h"
#include "EditorPreferencesPageViewportGizmo.h"
#include "EditorPreferencesPageViewportManipulator.h"
// Editor
#include "EditorViewportSettings.h"
@@ -53,11 +53,31 @@ CEditorPreferencesPage_ViewportManipulator::CEditorPreferencesPage_ViewportManip
m_icon = QIcon(":/res/Gizmos.svg");
}
const char* CEditorPreferencesPage_ViewportManipulator::GetCategory()
{
return "Viewports";
}
const char* CEditorPreferencesPage_ViewportManipulator::GetTitle()
{
return "Manipulators";
}
QIcon& CEditorPreferencesPage_ViewportManipulator::GetIcon()
{
return m_icon;
}
void CEditorPreferencesPage_ViewportManipulator::OnCancel()
{
// noop
}
bool CEditorPreferencesPage_ViewportManipulator::OnQueryCancel()
{
return true;
}
void CEditorPreferencesPage_ViewportManipulator::OnApply()
{
SandboxEditor::SetManipulatorLineBoundWidth(m_manipulators.m_manipulatorLineBoundWidth);
@@ -25,26 +25,12 @@ public:
CEditorPreferencesPage_ViewportManipulator();
virtual ~CEditorPreferencesPage_ViewportManipulator() = default;
virtual const char* GetCategory() override
{
return "Viewports";
}
virtual const char* GetTitle() override
{
return "Manipulators";
}
virtual QIcon& GetIcon() override;
virtual void OnApply() override;
virtual void OnCancel() override
{
}
virtual bool OnQueryCancel() override
{
return true;
}
const char* GetCategory() override;
const char* GetTitle() override;
QIcon& GetIcon() override;
void OnApply() override;
void OnCancel() override;
bool OnQueryCancel() override;
private:
void InitializeSettings();
+3 -3
View File
@@ -17,8 +17,8 @@
#include "EditorPreferencesPageGeneral.h"
#include "EditorPreferencesPageFiles.h"
#include "EditorPreferencesPageViewportGeneral.h"
#include "EditorPreferencesPageViewportGizmo.h"
#include "EditorPreferencesPageViewportMovement.h"
#include "EditorPreferencesPageViewportManipulator.h"
#include "EditorPreferencesPageViewportCamera.h"
#include "EditorPreferencesPageViewportDebug.h"
#include "EditorPreferencesPageExperimentalLighting.h"
#include "EditorPreferencesPageAWS.h"
@@ -35,7 +35,7 @@ CStdPreferencesClassDesc::CStdPreferencesClassDesc()
[](){ return new CEditorPreferencesPage_General(); },
[](){ return new CEditorPreferencesPage_Files(); },
[](){ return new CEditorPreferencesPage_ViewportGeneral(); },
[](){ return new CEditorPreferencesPage_ViewportMovement(); },
[](){ return new CEditorPreferencesPage_ViewportCamera(); },
[](){ return new CEditorPreferencesPage_ViewportManipulator(); },
[](){ return new CEditorPreferencesPage_ViewportDebug(); }
};
+4 -4
View File
@@ -554,10 +554,10 @@ set(FILES
EditorPreferencesPageFiles.cpp
EditorPreferencesPageViewportGeneral.h
EditorPreferencesPageViewportGeneral.cpp
EditorPreferencesPageViewportGizmo.h
EditorPreferencesPageViewportGizmo.cpp
EditorPreferencesPageViewportMovement.h
EditorPreferencesPageViewportMovement.cpp
EditorPreferencesPageViewportManipulator.h
EditorPreferencesPageViewportManipulator.cpp
EditorPreferencesPageViewportCamera.h
EditorPreferencesPageViewportCamera.cpp
EditorPreferencesPageViewportDebug.h
EditorPreferencesPageViewportDebug.cpp
EditorPreferencesPageExperimentalLighting.h