Change Standard Project Template to Default and Change Open 3D Foundation to Open 3D Engine in gem catalog (#1842)
Made Standard Template Always Show First and Default Selection
Changed Open 3D Foundation to Open 3D Engine in Gem Catalog and setup detection of Origin based on gem creator
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include <ProjectInfo.h>
|
||||
#endif
|
||||
|
||||
// due to current limitations, customizing template Gems is disabled
|
||||
#define TEMPLATE_GEM_CONFIGURATION_ENABLED
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QStackedWidget)
|
||||
|
||||
@@ -61,8 +61,8 @@ namespace O3DE::ProjectManager
|
||||
{
|
||||
switch (origin)
|
||||
{
|
||||
case O3DEFoundation:
|
||||
return "Open 3D Foundation";
|
||||
case Open3DEEngine:
|
||||
return "Open 3D Engine";
|
||||
case Local:
|
||||
return "Local";
|
||||
default:
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace O3DE::ProjectManager
|
||||
|
||||
enum GemOrigin
|
||||
{
|
||||
O3DEFoundation = 1 << 0,
|
||||
Open3DEEngine = 1 << 0,
|
||||
Local = 1 << 1,
|
||||
NumGemOrigins = 2
|
||||
};
|
||||
|
||||
@@ -97,10 +97,21 @@ namespace O3DE::ProjectManager
|
||||
{
|
||||
m_templates = templatesResult.GetValue();
|
||||
|
||||
// sort alphabetically by display name because they could be in any order
|
||||
// sort alphabetically by display name (but putting Standard first) because they could be in any order
|
||||
std::sort(m_templates.begin(), m_templates.end(), [](const ProjectTemplateInfo& arg1, const ProjectTemplateInfo& arg2)
|
||||
{
|
||||
return arg1.m_displayName.toLower() < arg2.m_displayName.toLower();
|
||||
if (arg1.m_displayName == "Standard")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (arg2.m_displayName == "Standard")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return arg1.m_displayName.toLower() < arg2.m_displayName.toLower();
|
||||
}
|
||||
});
|
||||
|
||||
for (int index = 0; index < m_templates.size(); ++index)
|
||||
|
||||
@@ -19,6 +19,7 @@ QT_FORWARD_DECLARE_CLASS(QFrame)
|
||||
namespace O3DE::ProjectManager
|
||||
{
|
||||
QT_FORWARD_DECLARE_CLASS(TagContainerWidget)
|
||||
|
||||
class NewProjectSettingsScreen
|
||||
: public ProjectSettingsScreen
|
||||
{
|
||||
|
||||
@@ -650,6 +650,12 @@ namespace O3DE::ProjectManager
|
||||
gemInfo.m_summary = Py_To_String_Optional(data, "Summary", "");
|
||||
gemInfo.m_version = Py_To_String_Optional(data, "Version", "");
|
||||
gemInfo.m_requirement = Py_To_String_Optional(data, "Requirements", "");
|
||||
gemInfo.m_creator = Py_To_String_Optional(data, "origin", "");
|
||||
|
||||
if (gemInfo.m_creator.contains("Open 3D Engine"))
|
||||
{
|
||||
gemInfo.m_gemOrigin = GemInfo::GemOrigin::Open3DEEngine;
|
||||
}
|
||||
|
||||
if (data.contains("Tags"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user