Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts: # Content/Shaders/GI/DDGI.flax # Content/Shaders/GUI.flax # Flax.flaxproj # Source/Editor/Windows/AboutDialog.cs # Source/Engine/Serialization/Stream.cpp # Source/Shaders/GUICommon.hlsl
This commit is contained in:
@@ -325,7 +325,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
var codeEditor = options.SourceCode.SourceCodeEditor;
|
||||
if (codeEditor != "None")
|
||||
{
|
||||
foreach (var e in Editor.Instance.CodeEditing.Editors)
|
||||
foreach (var e in _editors)
|
||||
{
|
||||
if (string.Equals(codeEditor, e.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
@@ -334,7 +334,10 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
}
|
||||
}
|
||||
}
|
||||
Editor.Instance.CodeEditing.SelectedEditor = editor;
|
||||
if (editor == null && _editors.Count != 0)
|
||||
editor = _editors[0];
|
||||
|
||||
SelectedEditor = editor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -41,9 +41,9 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
var vsCode = codeEditing.GetInBuildEditor(CodeEditorTypes.VSCode);
|
||||
var rider = codeEditing.GetInBuildEditor(CodeEditorTypes.Rider);
|
||||
|
||||
#if PLATFORM_WINDOW
|
||||
#if PLATFORM_WINDOWS
|
||||
// Favor the newest Visual Studio
|
||||
for (int i = (int)CodeEditorTypes.VS2019; i >= (int)CodeEditorTypes.VS2008; i--)
|
||||
for (int i = (int)CodeEditorTypes.VS2026; i >= (int)CodeEditorTypes.VS2008; i--)
|
||||
{
|
||||
var visualStudio = codeEditing.GetInBuildEditor((CodeEditorTypes)i);
|
||||
if (visualStudio != null)
|
||||
@@ -74,7 +74,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
public string Name => "Default";
|
||||
|
||||
/// <inheritdoc />
|
||||
public string GenerateProjectCustomArgs => null;
|
||||
public string GenerateProjectCustomArgs => _currentEditor?.GenerateProjectCustomArgs;
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OpenSolution()
|
||||
|
||||
@@ -22,71 +22,14 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
public InBuildSourceCodeEditor(CodeEditorTypes type)
|
||||
{
|
||||
Type = type;
|
||||
switch (type)
|
||||
{
|
||||
case CodeEditorTypes.Custom:
|
||||
Name = "Custom";
|
||||
break;
|
||||
case CodeEditorTypes.SystemDefault:
|
||||
Name = "System Default";
|
||||
break;
|
||||
case CodeEditorTypes.VS2008:
|
||||
Name = "Visual Studio 2008";
|
||||
break;
|
||||
case CodeEditorTypes.VS2010:
|
||||
Name = "Visual Studio 2010";
|
||||
break;
|
||||
case CodeEditorTypes.VS2012:
|
||||
Name = "Visual Studio 2012";
|
||||
break;
|
||||
case CodeEditorTypes.VS2013:
|
||||
Name = "Visual Studio 2013";
|
||||
break;
|
||||
case CodeEditorTypes.VS2015:
|
||||
Name = "Visual Studio 2015";
|
||||
break;
|
||||
case CodeEditorTypes.VS2017:
|
||||
Name = "Visual Studio 2017";
|
||||
break;
|
||||
case CodeEditorTypes.VS2019:
|
||||
Name = "Visual Studio 2019";
|
||||
break;
|
||||
case CodeEditorTypes.VS2022:
|
||||
Name = "Visual Studio 2022";
|
||||
break;
|
||||
case CodeEditorTypes.VS2026:
|
||||
Name = "Visual Studio 2026";
|
||||
break;
|
||||
case CodeEditorTypes.VSCode:
|
||||
Name = "Visual Studio Code";
|
||||
break;
|
||||
case CodeEditorTypes.VSCodeInsiders:
|
||||
Name = "Visual Studio Code - Insiders";
|
||||
break;
|
||||
case CodeEditorTypes.Rider:
|
||||
Name = "Rider";
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException(nameof(type), type, null);
|
||||
}
|
||||
Name = CodeEditingManager.GetName(type);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public string GenerateProjectCustomArgs
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (Type)
|
||||
{
|
||||
case CodeEditorTypes.VSCodeInsiders:
|
||||
case CodeEditorTypes.VSCode: return "-vscode -vs2022";
|
||||
case CodeEditorTypes.Rider: return "-vs2022";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
public string GenerateProjectCustomArgs => CodeEditingManager.GetGenerateProjectCustomArgs(Type);
|
||||
|
||||
/// <inheritdoc />
|
||||
public void OpenSolution()
|
||||
|
||||
Reference in New Issue
Block a user