EditorPreferencesPageViewportGeneral.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include "Include/IPreferencesPage.h"
  10. #include <AzCore/Math/Color.h>
  11. #include <AzCore/RTTI/TypeInfoSimple.h>
  12. #include <AzCore/RTTI/RTTIMacros.h>
  13. #include <QIcon>
  14. namespace AZ
  15. {
  16. class SerializeContext;
  17. }
  18. class CEditorPreferencesPage_ViewportGeneral : public IPreferencesPage
  19. {
  20. public:
  21. AZ_RTTI(CEditorPreferencesPage_ViewportGeneral, "{8511FF7F-F774-47E1-A99B-3DE3A867E403}", IPreferencesPage)
  22. static void Reflect(AZ::SerializeContext& serialize);
  23. CEditorPreferencesPage_ViewportGeneral();
  24. virtual ~CEditorPreferencesPage_ViewportGeneral() = default;
  25. virtual const char* GetCategory() override;
  26. virtual const char* GetTitle() override;
  27. virtual QIcon& GetIcon() override;
  28. virtual void OnApply() override;
  29. virtual void OnCancel() override;
  30. virtual bool OnQueryCancel() override;
  31. private:
  32. void InitializeSettings();
  33. struct General
  34. {
  35. AZ_TYPE_INFO(General, "{3BAC6F1C-E954-4EDD-95B0-90741B1010E0}")
  36. bool m_sync2DViews;
  37. float m_defaultFOV;
  38. float m_defaultFarPlane;
  39. float m_defaultNearPlane;
  40. float m_defaultAspectRatio;
  41. bool m_contextMenuEnabled;
  42. bool m_stickySelectEnabled;
  43. };
  44. struct Display
  45. {
  46. AZ_TYPE_INFO(Display, "{F0376933-FA0B-4B58-9DD9-6F6EBC7386CA}")
  47. bool m_highlightSelGeom;
  48. bool m_highlightSelVegetation;
  49. bool m_highlightOnMouseOver;
  50. bool m_hideMouseCursorWhenCaptured;
  51. int m_dragSquareSize;
  52. bool m_displayLinks;
  53. bool m_displayTracks;
  54. bool m_alwaysShowRadii;
  55. bool m_showBBoxes;
  56. bool m_drawEntityLabels;
  57. bool m_showTriggerBounds;
  58. bool m_showFrozenHelpers;
  59. bool m_fillSelectedShapes;
  60. bool m_showGridGuide;
  61. bool m_displayDimension;
  62. };
  63. struct MapViewport
  64. {
  65. AZ_TYPE_INFO(MapViewport, "{FF49D39D-9A92-4605-B20A-C1E72934DD16}")
  66. bool m_swapXY;
  67. int m_resolution;
  68. };
  69. struct TextLabels
  70. {
  71. AZ_TYPE_INFO(TextLabels, "{DD3972ED-5120-4552-8D55-3D3967A29360}")
  72. bool m_labelsOn;
  73. float m_labelsDistance;
  74. };
  75. struct SelectionPreviewColor
  76. {
  77. AZ_TYPE_INFO(SelectionPreviewColor, "{801A5252-B238-4832-BDA4-EAE0D0F98850}")
  78. AZ::Color m_colorGroupBBox;
  79. AZ::Color m_colorEntityBBox;
  80. float m_fBBoxAlpha;
  81. AZ::Color m_geometryHighlightColor;
  82. AZ::Color m_solidBrushGeometryColor;
  83. float m_fgeomAlpha;
  84. float m_childObjectGeomAlpha;
  85. };
  86. General m_general;
  87. Display m_display;
  88. MapViewport m_map;
  89. TextLabels m_textLabels;
  90. SelectionPreviewColor m_selectionPreviewColor;
  91. QIcon m_icon;
  92. };