Merge branch 'development' of https://github.com/o3de/o3de into carlitosan/development

This commit is contained in:
chcurran
2021-07-12 16:05:19 -07:00
15 changed files with 0 additions and 2286 deletions
-1
View File
@@ -138,7 +138,6 @@ ly_add_source_properties(
ly_add_source_properties(
SOURCES
Core/LevelEditorMenuHandler.cpp
GraphicsSettingsDialog.cpp
MainWindow.cpp
PROPERTY COMPILE_DEFINITIONS
VALUES ${LY_PAL_TOOLS_DEFINES}
@@ -552,49 +552,9 @@ void LevelEditorMenuHandler::PopulateEditMenu(ActionManager::MenuWrapper& editMe
// Global Preferences...
editorSettingsMenu.AddAction(ID_TOOLS_PREFERENCES);
// Graphics Settings...
editorSettingsMenu.AddAction(ID_GRAPHICS_SETTINGS);
// Editor Settings Manager
AddOpenViewPaneAction(editorSettingsMenu, LyViewPane::EditorSettingsManager);
// Graphics Performance
auto graphicPerformanceSubMenu = editorSettingsMenu.AddMenu(QObject::tr("Graphics Performance"));
auto pcMenu = graphicPerformanceSubMenu.AddMenu(tr("PC"));
pcMenu.AddAction(ID_GAME_PC_ENABLEVERYHIGHSPEC);
pcMenu.AddAction(ID_GAME_PC_ENABLEHIGHSPEC);
pcMenu.AddAction(ID_GAME_PC_ENABLEMEDIUMSPEC);
pcMenu.AddAction(ID_GAME_PC_ENABLELOWSPEC);
auto osxmetalMenu = graphicPerformanceSubMenu.AddMenu(tr("OSX Metal"));
osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC);
osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEHIGHSPEC);
osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC);
osxmetalMenu.AddAction(ID_GAME_OSXMETAL_ENABLELOWSPEC);
auto androidMenu = graphicPerformanceSubMenu.AddMenu(tr("Android"));
androidMenu.AddAction(ID_GAME_ANDROID_ENABLEVERYHIGHSPEC);
androidMenu.AddAction(ID_GAME_ANDROID_ENABLEHIGHSPEC);
androidMenu.AddAction(ID_GAME_ANDROID_ENABLEMEDIUMSPEC);
androidMenu.AddAction(ID_GAME_ANDROID_ENABLELOWSPEC);
auto iosMenu = graphicPerformanceSubMenu.AddMenu(tr("iOS"));
iosMenu.AddAction(ID_GAME_IOS_ENABLEVERYHIGHSPEC);
iosMenu.AddAction(ID_GAME_IOS_ENABLEHIGHSPEC);
iosMenu.AddAction(ID_GAME_IOS_ENABLEMEDIUMSPEC);
iosMenu.AddAction(ID_GAME_IOS_ENABLELOWSPEC);
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
auto publicname##Menu = graphicPerformanceSubMenu.AddMenu(tr(PublicAuxName2));\
publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLEHIGHSPEC);\
publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC);\
publicname##Menu.AddAction(ID_GAME_##CODENAME##_ENABLELOWSPEC);
AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
#undef AZ_RESTRICTED_PLATFORM_EXPANSION
#endif
// Keyboard Customization
auto keyboardCustomizationMenu = editorSettingsMenu.AddMenu(tr("Keyboard Customization"));
keyboardCustomizationMenu.AddAction(ID_TOOLS_CUSTOMIZEKEYBOARD);
-102
View File
@@ -111,7 +111,6 @@ AZ_POP_DISABLE_WARNING
#include "ToolBox.h"
#include "LevelInfo.h"
#include "EditorPreferencesDialog.h"
#include "GraphicsSettingsDialog.h"
#include "AnimationContext.h"
#include "GotoPositionDlg.h"
@@ -440,7 +439,6 @@ void CCryEditApp::RegisterActionHandlers()
ON_COMMAND(ID_CLEAR_REGISTRY, OnClearRegistryData)
ON_COMMAND(ID_VALIDATELEVEL, OnValidatelevel)
ON_COMMAND(ID_TOOLS_PREFERENCES, OnToolsPreferences)
ON_COMMAND(ID_GRAPHICS_SETTINGS, OnGraphicsSettings)
ON_COMMAND(ID_SWITCHCAMERA_DEFAULTCAMERA, OnSwitchToDefaultCamera)
ON_COMMAND(ID_SWITCHCAMERA_SEQUENCECAMERA, OnSwitchToSequenceCamera)
ON_COMMAND(ID_SWITCHCAMERA_SELECTEDCAMERA, OnSwitchToSelectedcamera)
@@ -453,14 +451,6 @@ void CCryEditApp::RegisterActionHandlers()
ON_COMMAND(ID_OPEN_TRACKVIEW, OnOpenTrackView)
ON_COMMAND(ID_OPEN_UICANVASEDITOR, OnOpenUICanvasEditor)
ON_COMMAND_RANGE(ID_GAME_PC_ENABLELOWSPEC, ID_GAME_PC_ENABLEVERYHIGHSPEC, OnChangeGameSpec)
ON_COMMAND_RANGE(ID_GAME_OSXMETAL_ENABLELOWSPEC, ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC, OnChangeGameSpec)
ON_COMMAND_RANGE(ID_GAME_ANDROID_ENABLELOWSPEC, ID_GAME_ANDROID_ENABLEVERYHIGHSPEC, OnChangeGameSpec)
ON_COMMAND_RANGE(ID_GAME_IOS_ENABLELOWSPEC, ID_GAME_IOS_ENABLEVERYHIGHSPEC, OnChangeGameSpec)
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
ON_COMMAND_RANGE(ID_GAME_##CODENAME##_ENABLELOWSPEC, ID_GAME_##CODENAME##_ENABLEHIGHSPEC, OnChangeGameSpec)
@@ -3674,13 +3664,6 @@ void CCryEditApp::OnToolsPreferences()
dlg.exec();
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::OnGraphicsSettings()
{
GraphicsSettingsDialog dlg(MainWindow::instance());
dlg.exec();
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::OnSwitchToDefaultCamera()
{
@@ -3815,91 +3798,6 @@ void CCryEditApp::OnOpenUICanvasEditor()
QtViewPaneManager::instance()->OpenPane(LyViewPane::UiEditor);
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::SetGameSpecCheck(ESystemConfigSpec spec, ESystemConfigPlatform platform, int &nCheck, bool &enable)
{
if (GetIEditor()->GetEditorConfigSpec() == spec && GetIEditor()->GetEditorConfigPlatform() == platform)
{
nCheck = 1;
}
enable = spec <= GetIEditor()->GetSystem()->GetMaxConfigSpec();
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::OnUpdateGameSpec(QAction* action)
{
Q_ASSERT(action->isCheckable());
int nCheck = 0;
bool enable = true;
switch (action->data().toInt())
{
case ID_GAME_PC_ENABLELOWSPEC:
SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_PC, nCheck, enable);
break;
case ID_GAME_PC_ENABLEMEDIUMSPEC:
SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_PC, nCheck, enable);
break;
case ID_GAME_PC_ENABLEHIGHSPEC:
SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_PC, nCheck, enable);
break;
case ID_GAME_PC_ENABLEVERYHIGHSPEC:
SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_PC, nCheck, enable);
break;
case ID_GAME_OSXMETAL_ENABLELOWSPEC:
SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_OSX_METAL, nCheck, enable);
break;
case ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC:
SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_OSX_METAL, nCheck, enable);
break;
case ID_GAME_OSXMETAL_ENABLEHIGHSPEC:
SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_OSX_METAL, nCheck, enable);
break;
case ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC:
SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_OSX_METAL, nCheck, enable);
break;
case ID_GAME_ANDROID_ENABLELOWSPEC:
SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_ANDROID, nCheck, enable);
break;
case ID_GAME_ANDROID_ENABLEMEDIUMSPEC:
SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_ANDROID, nCheck, enable);
break;
case ID_GAME_ANDROID_ENABLEHIGHSPEC:
SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_ANDROID, nCheck, enable);
break;
case ID_GAME_ANDROID_ENABLEVERYHIGHSPEC:
SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_ANDROID, nCheck, enable);
break;
case ID_GAME_IOS_ENABLELOWSPEC:
SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_IOS, nCheck, enable);
break;
case ID_GAME_IOS_ENABLEMEDIUMSPEC:
SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_IOS, nCheck, enable);
break;
case ID_GAME_IOS_ENABLEHIGHSPEC:
SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_IOS, nCheck, enable);
break;
case ID_GAME_IOS_ENABLEVERYHIGHSPEC:
SetGameSpecCheck(CONFIG_VERYHIGH_SPEC, CONFIG_IOS, nCheck, enable);
break;
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
case ID_GAME_##CODENAME##_ENABLELOWSPEC:\
SetGameSpecCheck(CONFIG_LOW_SPEC, CONFIG_##CODENAME, nCheck, enable);\
break;\
case ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC:\
SetGameSpecCheck(CONFIG_MEDIUM_SPEC, CONFIG_##CODENAME, nCheck, enable);\
break;\
case ID_GAME_##CODENAME##_ENABLEHIGHSPEC:\
SetGameSpecCheck(CONFIG_HIGH_SPEC, CONFIG_##CODENAME, nCheck, enable);\
break;
AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
#undef AZ_RESTRICTED_PLATFORM_EXPANSION
#endif
}
action->setChecked(nCheck);
action->setEnabled(enable);
}
//////////////////////////////////////////////////////////////////////////
RecentFileList* CCryEditApp::GetRecentFileList()
{
-4
View File
@@ -403,7 +403,6 @@ private:
void OnClearRegistryData();
void OnValidatelevel();
void OnToolsPreferences();
void OnGraphicsSettings();
void OnSwitchToDefaultCamera();
void OnUpdateSwitchToDefaultCamera(QAction* action);
void OnSwitchToSequenceCamera();
@@ -416,9 +415,6 @@ private:
void OnOpenTrackView();
void OnOpenAudioControlsEditor();
void OnOpenUICanvasEditor();
void OnChangeGameSpec(UINT nID);
void SetGameSpecCheck(ESystemConfigSpec spec, ESystemConfigPlatform platform, int &nCheck, bool &enable);
void OnUpdateGameSpec(QAction* action);
void OnOpenQuickAccessBar();
public:
-72
View File
@@ -407,78 +407,6 @@ inline namespace Commands
}
}
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::OnChangeGameSpec(UINT nID)
{
switch (nID)
{
case ID_GAME_PC_ENABLELOWSPEC:
Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_PC);
break;
case ID_GAME_PC_ENABLEMEDIUMSPEC:
Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_PC);
break;
case ID_GAME_PC_ENABLEHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_PC);
break;
case ID_GAME_PC_ENABLEVERYHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_PC);
break;
case ID_GAME_OSXMETAL_ENABLELOWSPEC:
Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_OSX_METAL);
break;
case ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC:
Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_OSX_METAL);
break;
case ID_GAME_OSXMETAL_ENABLEHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_OSX_METAL);
break;
case ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_OSX_METAL);
break;
case ID_GAME_ANDROID_ENABLELOWSPEC:
Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_ANDROID);
break;
case ID_GAME_ANDROID_ENABLEMEDIUMSPEC:
Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_ANDROID);
break;
case ID_GAME_ANDROID_ENABLEHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_ANDROID);
break;
case ID_GAME_ANDROID_ENABLEVERYHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_ANDROID);
break;
case ID_GAME_IOS_ENABLELOWSPEC:
Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_IOS);
break;
case ID_GAME_IOS_ENABLEMEDIUMSPEC:
Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_IOS);
break;
case ID_GAME_IOS_ENABLEHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_IOS);
break;
case ID_GAME_IOS_ENABLEVERYHIGHSPEC:
Commands::PySetConfigSpec(CONFIG_VERYHIGH_SPEC, CONFIG_IOS);
break;
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3)\
case ID_GAME_##CODENAME##_ENABLELOWSPEC:\
Commands::PySetConfigSpec(CONFIG_LOW_SPEC, CONFIG_##CODENAME);\
break;\
case ID_GAME_##CODENAME##_ENABLEMEDIUMSPEC:\
Commands::PySetConfigSpec(CONFIG_MEDIUM_SPEC, CONFIG_##CODENAME);\
break;\
case ID_GAME_##CODENAME##_ENABLEHIGHSPEC:\
Commands::PySetConfigSpec(CONFIG_HIGH_SPEC, CONFIG_##CODENAME);\
break;
AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS
#undef AZ_RESTRICTED_PLATFORM_EXPANSION
#endif
}
}
namespace AzToolsFramework
{
void CryEditPythonHandler::Reflect(AZ::ReflectContext* context)
File diff suppressed because it is too large Load Diff
-284
View File
@@ -1,284 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#if !defined(Q_MOC_RUN)
#include <QDialog>
#include <QTreeView>
#include <QStandardItemModel>
#include <QHeaderView>
#include <AzQtComponents/Components/Widgets/SpinBox.h>
#include <AzCore/std/containers/vector.h>
#include <AzCore/std/any.h>
#include <ISystem.h>
#endif
class QGridLayout;
class QLabel;
namespace Ui
{
class GraphicsSettingsDialog;
}
// Description:
// Status of cvar for a specifc platform and spec level
// editedValue - current setting within Graphics Settings Dialog box
// overwrittenValue - original setting from platform config file (set to originalValue if not found)
// originalValue - original settings from sys_spec config file index
struct CVarFileStatus
{
AZStd::any editedValue;
AZStd::any overwrittenValue;
AZStd::any originalValue;
CVarFileStatus(AZStd::any edit, AZStd::any over, AZStd::any orig) : editedValue(edit), overwrittenValue(over), originalValue(orig) {}
};
// Description:
// Status of specific cvar for Editor mapping
// type - CVAR_INT / CVAR_FLOAT / CVAR_STRING
// cvarGroup - source of cvar (sys_spec_particles, sys_spec_physics, etc.) or "miscellaneous" if only specified in platform config file
// fileVals = CVarFileStatus for each spec level of a specific platform
struct CVarInfo
{
int type;
AZStd::string cvarGroup;
AZStd::vector<CVarFileStatus> fileVals;
};
enum class GraphicsSettings
{
GameEffects,
Light,
ObjectDetail,
Particles,
Physics,
PostProcessing,
Quality,
Shading,
Shadows,
Sound,
Texture,
TextureResolution,
VolumetricEffects,
Water,
Miscellaneous,
numSettings
};
class GraphicsSettingsHeaderView;
class GraphicsSettingsTreeView
: public QTreeView
{
Q_OBJECT
public:
GraphicsSettingsTreeView(QWidget* parent = nullptr);
};
class GraphicsSettingsModel
: public QStandardItemModel
{
Q_OBJECT
public:
explicit GraphicsSettingsModel(QObject* parent = 0);
Qt::ItemFlags flags(const QModelIndex& index) const override;
};
class GraphicsSettingsDialog
: public QDialog,
public ILoadConfigurationEntrySink
{
Q_OBJECT
public:
explicit GraphicsSettingsDialog(QWidget* parent = nullptr);
virtual ~GraphicsSettingsDialog();
bool IsCustom(void) { return m_showCustomSpec; }
void UnloadCustomSpec(int specLevel);
// ILoadConfigurationEntrySink
void OnLoadConfigurationEntry(const char* szKey, const char* szValue, const char* szGroup) override;
public slots:
//Accept and reject
void reject() override;
void accept() override;
private slots:
//Update UIs
void PlatformChanged(const QString& platform);
bool CVarChanged(AZStd::any val, const char* cvarName, int specLevel);
void CVarChanged(int i);
void CVarChanged(double d);
void CVarChanged(const QString& s);
private:
// The struct ParameterWidget is used to store the parameter widget
// m_parameterName will be the name of the parameter the widget represent.
struct ParameterWidget
{
ParameterWidget(QWidget* widget, QString parameterName = "");
QString GetToolTip() const;
const char* PARAMETER_TOOLTIP = "The variable will update render parameter \"%1\".";
QWidget* m_widget;
QString m_parameterName;
};
struct CollapseGroup
{
QString m_groupName;
QStandardItem* m_groupRow;
QTreeView* m_treeView;
bool m_isCollapsed;
CollapseGroup(QTreeView* treeView);
void ToggleCollapsed();
};
void OpenCustomSpecDialog();
void ApplyCustomSpec(const QString& customFilePath);
bool IsCustomSpecAlreadyLoaded(const AZStd::string& filename) const;
void SetSettingsTree(int numColumns);
void SetCollapsed(const QModelIndex& index, bool flag);
enum CVarStateComparison
{
EDITED_OVERWRITTEN_COMPARE = 1,
EDITED_ORIGINAL_COMPARE = 2,
OVERWRITTEN_ORIGINAL_COMPARE = 3,
END_CVARSTATE_COMPARE,
};
bool CheckCVarStatesForDiff(AZStd::pair<AZStd::string, CVarInfo>* it, int cfgFileIndex, CVarStateComparison cmp);
// Save out settings into project-level cfg files
void SaveSystemSettings();
// Load in project-level cfg files for current platform
void LoadPlatformConfigurations();
// Build UI column for spec level of current platform
void BuildColumn(int specLevel);
// Initial UI building
void BuildUI();
// Cleaning out UI before loading new platform information
void CleanUI();
// Shows/hides custom spec option
void ShowCustomSpecOption(bool show);
// Shows/hides category labels and dropdowns
void ShowCategories(bool show);
// Warns about unsaved changes (returns true if accepted)
bool SendUnsavedChangesWarning(bool cancel);
void LoadCVarGroupDirectory(const AZStd::string& path);
/////////////////////////////////////////////
// UI help functions
// Setup collapsed buttons
void SetCollapsedLayout(const QString& groupName, QStandardItem* groupItem);
// Sets the platform entry index for the given platform
void SetPlatformEntry(ESystemConfigPlatform platform);
// Gets the platform enum given the platform name
ESystemConfigPlatform GetConfigPlatformFromName(const AZStd::string& platformName);
////////////////////////////////////////////
// Members
// Qt values
const int INPUT_MIN_WIDTH = 100;
const int INPUT_MIN_HEIGHT = 20;
const int INPUT_ROW_SPAN = 1;
const int INPUT_COLUMN_SPAN = 1;
const int CVAR_ROW_OFFSET = 2;
const int CVAR_VALUE_COLUMN_OFFSET = 1;
const int PLATFORM_LABEL_ROW = 1;
const int CVAR_LABEL_COLUMN = 1;
// Tool tips
const QString SETTINGS_FILE_PATH = "Config/spec/";
const char* CFG_FILEFILTER = "Cfg File(*.cfg);;All files(*)";
const int m_numSpecLevels = 4;
bool m_showCustomSpec;
bool m_showCategories;
GraphicsSettingsModel* m_graphicsSettingsModel;
GraphicsSettingsHeaderView* m_headerView;
int m_numColumns{ 0 };
const char* m_cvarGroupsFolder = "Config/CVarGroups";
QScopedPointer<Ui::GraphicsSettingsDialog> m_ui;
QVector<CollapseGroup*> m_uiCollapseGroup;
QVector<ParameterWidget*> m_parameterWidgets;
AZStd::string m_currentConfigFilename;
size_t m_currentSpecIndex;
// cvar name --> pair(type, CVarStatus for each file)
AZStd::unordered_map<AZStd::string, CVarInfo> m_cVarTracker;
AZStd::unordered_map<ESystemConfigPlatform, AZStd::vector<AZStd::string> > m_cfgFiles;
AZStd::vector<AZStd::pair<AZStd::string, ESystemConfigPlatform> > m_platformStrings;
struct CVarGroupInfo
{
QVector<QLabel*> m_platformLabels;
QVector<QLabel*> m_cvarLabels;
QVector<AzQtComponents::SpinBox*> m_cvarSpinBoxes;
QVector<AzQtComponents::DoubleSpinBox*> m_cvarDoubleSpinBoxes;
QVector<QLineEdit*> m_cvarLineEdits;
QVector<QToolButton*> m_specFileArea;
QVector<QWidget*> m_widgetInsertOrder;
QStandardItem* m_treeRowItem;
int m_currentRow;
};
AZStd::unordered_map<AZStd::string, CVarGroupInfo> m_cvarGroupData;
AZStd::vector<AZStd::string> m_cvarGroupOrder;
ESystemConfigPlatform m_currentPlatform;
int m_dirtyCVarCount;
};
class GraphicsSettingsHeaderView
: public QHeaderView
{
Q_OBJECT
public:
GraphicsSettingsHeaderView(GraphicsSettingsDialog* dialog, Qt::Orientation orientation, QWidget* parent = nullptr);
private:
bool event(QEvent* e) override;
void mouseMoveEvent(QMouseEvent* e) override;
void mouseReleaseEvent(QMouseEvent* e) override;
GraphicsSettingsDialog* m_dialog;
int m_index{ -1 };
};
-44
View File
@@ -687,49 +687,6 @@ void MainWindow::InitActions()
am->AddAction(ID_FILE_PROJECT_MANAGER_SETTINGS, tr("Edit Project Settings..."));
am->AddAction(ID_FILE_PROJECT_MANAGER_NEW, tr("New Project..."));
am->AddAction(ID_FILE_PROJECT_MANAGER_OPEN, tr("Open Project..."));
am->AddAction(ID_GAME_PC_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_PC_ENABLEHIGHSPEC, tr("High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_PC_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_PC_ENABLELOWSPEC, tr("Low")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_OSXMETAL_ENABLEHIGHSPEC, tr("High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_OSXMETAL_ENABLELOWSPEC, tr("Low")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_ANDROID_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_ANDROID_ENABLEHIGHSPEC, tr("High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_ANDROID_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_ANDROID_ENABLELOWSPEC, tr("Low")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_IOS_ENABLEVERYHIGHSPEC, tr("Very High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_IOS_ENABLEHIGHSPEC, tr("High")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_IOS_ENABLEMEDIUMSPEC, tr("Medium")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
am->AddAction(ID_GAME_IOS_ENABLELOWSPEC, tr("Low")).SetCheckable(true)
.RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateGameSpec);
#if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS)
#if defined(TOOLS_SUPPORT_JASPER)
#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, jasper)
#endif
#if defined(TOOLS_SUPPORT_PROVO)
#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, provo)
#endif
#if defined(TOOLS_SUPPORT_SALEM)
#include AZ_RESTRICTED_FILE_EXPLICIT(MainWindow_cpp, salem)
#endif
#endif
am->AddAction(ID_TOOLS_CUSTOMIZEKEYBOARD, tr("Customize &Keyboard..."))
.Connect(&QAction::triggered, this, &MainWindow::ShowKeyboardCustomization);
am->AddAction(ID_TOOLS_EXPORT_SHORTCUTS, tr("&Export Keyboard Settings..."))
@@ -737,7 +694,6 @@ void MainWindow::InitActions()
am->AddAction(ID_TOOLS_IMPORT_SHORTCUTS, tr("&Import Keyboard Settings..."))
.Connect(&QAction::triggered, this, &MainWindow::ImportKeyboardShortcuts);
am->AddAction(ID_TOOLS_PREFERENCES, tr("Global Preferences..."));
am->AddAction(ID_GRAPHICS_SETTINGS, tr("&Graphics Settings..."));
for (int i = ID_FILE_MRU_FIRST; i <= ID_FILE_MRU_LAST; ++i)
{
-26
View File
@@ -187,7 +187,6 @@
#define ID_SWITCHCAMERA_SEQUENCECAMERA 33701
#define ID_SWITCHCAMERA_SELECTEDCAMERA 33702
#define ID_TV_RECORD_AUTO 33703
#define ID_GRAPHICS_SETTINGS 33705
#define ID_VIEW_OPENVIEWPANE 33709
#define ID_VIEW_OPENPANE_FIRST 33712
#define ID_VIEW_OPENPANE_LAST 33811
@@ -219,10 +218,6 @@
#define ID_SPLINE_SNAP_GRID_X 33933
#define ID_SPLINE_SNAP_GRID_Y 33934
#define ID_FREEZE_TANGENTS 33935
#define ID_GAME_PC_ENABLELOWSPEC 33960
#define ID_GAME_PC_ENABLEMEDIUMSPEC 33961
#define ID_GAME_PC_ENABLEHIGHSPEC 33962
#define ID_GAME_PC_ENABLEVERYHIGHSPEC 33963
#define ID_PANEL_VEG_CREATE_SEL 33990
#define ID_TOOLS_UPDATEPROCEDURALVEGETATION 33999
#define ID_DISPLAY_GOTOPOSITION 34004
@@ -287,14 +282,6 @@
#define ID_CLEAR_REGISTRY 34470
#define ID_SOUND_STOPALLSOUNDS 34476
#define ID_AUDIO_REFRESH_AUDIO_SYSTEM 34477
#define ID_GAME_ANDROID_ENABLELOWSPEC 34490
#define ID_GAME_ANDROID_ENABLEMEDIUMSPEC 34491
#define ID_GAME_ANDROID_ENABLEHIGHSPEC 34492
#define ID_GAME_ANDROID_ENABLEVERYHIGHSPEC 34493
#define ID_GAME_IOS_ENABLELOWSPEC 34494
#define ID_GAME_IOS_ENABLEMEDIUMSPEC 34495
#define ID_GAME_IOS_ENABLEHIGHSPEC 34496
#define ID_GAME_IOS_ENABLEVERYHIGHSPEC 34497
#define ID_OPEN_AUDIO_CONTROLS_BROWSER 34580
#define ID_CREATE_GLOBAL_FG_MODULE_FROM_SELECTION 35076
#define ID_CREATE_LEVEL_FG_MODULE_FROM_SELECTION 35077
@@ -324,19 +311,6 @@
#define ID_DOCUMENTATION_FEEDBACK 36043
#define ID_OPEN_SUBSTANCE_EDITOR 36060
#define ID_IMPORT_ASSET 36069
#define ID_GAME_PROVO_ENABLELOWSPEC 34603
#define ID_GAME_PROVO_ENABLEMEDIUMSPEC 34604
#define ID_GAME_PROVO_ENABLEHIGHSPEC 34605
#define ID_GAME_OSXMETAL_ENABLELOWSPEC 34606
#define ID_GAME_OSXMETAL_ENABLEMEDIUMSPEC 34607
#define ID_GAME_OSXMETAL_ENABLEHIGHSPEC 34608
#define ID_GAME_OSXMETAL_ENABLEVERYHIGHSPEC 34609
#define ID_GAME_SALEM_ENABLELOWSPEC 34610
#define ID_GAME_SALEM_ENABLEMEDIUMSPEC 34611
#define ID_GAME_SALEM_ENABLEHIGHSPEC 34612
#define ID_GAME_JASPER_ENABLELOWSPEC 34613
#define ID_GAME_JASPER_ENABLEMEDIUMSPEC 34614
#define ID_GAME_JASPER_ENABLEHIGHSPEC 34615
#define ID_FILE_RESAVESLICES 36210
#define FIRST_QT_ACTION 50000
#define ID_VIEW_CONSOLEWINDOW 50001
@@ -1,25 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#GraphicsSettingsDialog QHeaderView::section
{
background: #2D2D2D;
}
#GraphicsSettingsDialog QHeaderView::down-arrow
{
width: 14px;
height: 14px;
image: url(:/Gallery/Delete.svg);
}
#GraphicsSettingsDialog QHeaderView::up-arrow
{
width: 14px;
height: 14px;
image: url(:/Gallery/Delete.svg);
}
-1
View File
@@ -3,6 +3,5 @@
<file alias="Assets/Editor/Style/Editor.qss">Editor.qss</file>
<file alias="Assets/Editor/Style/EditorPreferencesDialog.qss">EditorPreferencesDialog.qss</file>
<file alias="Assets/Editor/Style/LayoutConfigDialog.qss">LayoutConfigDialog.qss</file>
<file alias="Assets/Editor/Style/GraphicsSettingsDialog.qss">GraphicsSettingsDialog.qss</file>
</qresource>
</RCC>
-3
View File
@@ -583,9 +583,6 @@ set(FILES
SettingsManager.h
SettingsManagerDialog.h
SettingsManagerDialog.ui
GraphicsSettingsDialog.h
GraphicsSettingsDialog.cpp
graphicssettingsdialog.ui
AboutDialog.cpp
ErrorReportTableModel.h
ErrorReportTableModel.cpp
-270
View File
@@ -1,270 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GraphicsSettingsDialog</class>
<widget class="QDialog" name="GraphicsSettingsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1292</width>
<height>565</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>800</width>
<height>400</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="windowTitle">
<string>Graphics Settings</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QGridLayout" name="m_generalLayout">
<property name="horizontalSpacing">
<number>0</number>
</property>
<property name="verticalSpacing">
<number>6</number>
</property>
<item row="2" column="3">
<widget class="QWidget" name="m_platform" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QComboBox" name="m_platformEntry"/>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<widget class="QPushButton" name="m_selectCustomSpecButton">
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>Add Resource</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="m_platformLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>Platform</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Line" name="m_lineSpacer">
<property name="minimumSize">
<size>
<width>13</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QScrollArea" name="m_scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
<widget class="QWidget" name="m_scrollAreaWidgetContents">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1272</width>
<height>452</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="GraphicsSettingsTreeView" name="m_graphicsSettingsTreeView">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="indentation">
<number>8</number>
</property>
<attribute name="headerStretchLastSection">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="m_horizontalLayout">
<item>
<spacer name="m_horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="m_applyButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgb(233, 118, 17);</string>
</property>
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="m_cancelButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
<zorder>line</zorder>
<zorder>m_scrollArea</zorder>
<zorder>line_2</zorder>
<zorder>widget</zorder>
</widget>
<customwidgets>
<customwidget>
<class>GraphicsSettingsTreeView</class>
<extends>QTreeView</extends>
<header>GraphicsSettingsDialog.h</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>m_cancelButton</tabstop>
<tabstop>m_applyButton</tabstop>
<tabstop>m_scrollArea</tabstop>
</tabstops>
<resources/>
<connections/>
</ui>