This commit is contained in:
TSG 2022-06-12 20:12:55 -04:00
commit 79d1ee81c6
6 changed files with 42 additions and 9 deletions

View File

@ -21,11 +21,10 @@ jobs:
- name: Fetch Submodules Recursively
run: git submodule update --init --recursive
- name: .NET 7 Setup
- name: .NET 6 Setup
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0.x'
include-prerelease: true
dotnet-version: '6.0.x'
- name: .NET Restore
run: dotnet restore FModel

@ -1 +1 @@
Subproject commit 06d2998e55fb67611fac7feab65838ae18ae43b1
Subproject commit d2d8fe2e3e9575fea5f18ce8e317ff62acaa66c7

View File

@ -13,6 +13,7 @@ public static class AvalonExtensions
private static readonly IHighlightingDefinition _xmlHighlighter = LoadHighlighter("Xml.xshd");
private static readonly IHighlightingDefinition _cppHighlighter = LoadHighlighter("Cpp.xshd");
private static readonly IHighlightingDefinition _changelogHighlighter = LoadHighlighter("Changelog.xshd");
private static readonly IHighlightingDefinition _ulangHighlighter = LoadHighlighter("ULang.xshd");
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static IHighlightingDefinition LoadHighlighter(string resourceName)
@ -38,6 +39,8 @@ public static class AvalonExtensions
return _cppHighlighter;
case "changelog":
return _changelogHighlighter;
case "ulang":
return _ulangHighlighter;
case "bat":
case "txt":
case "po":
@ -46,4 +49,4 @@ public static class AvalonExtensions
return _jsonHighlighter;
}
}
}
}

View File

@ -2,12 +2,12 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<ApplicationIcon>FModel.ico</ApplicationIcon>
<Version>4.2.2</Version>
<AssemblyVersion>4.2.2.1</AssemblyVersion>
<FileVersion>4.2.2.1</FileVersion>
<AssemblyVersion>4.2.2.2</AssemblyVersion>
<FileVersion>4.2.2.2</FileVersion>
<IsPackable>false</IsPackable>
<IsPublishable>true</IsPublishable>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
@ -69,6 +69,7 @@
<None Remove="Resources\athena.png" />
<None Remove="Resources\Json.xshd" />
<None Remove="Resources\Ini.xshd" />
<None Remove="Resources\Ulang.xshd" />
<None Remove="Resources\Xml.xshd" />
<None Remove="Resources\Cpp.xshd" />
<None Remove="Resources\Changelog.xshd" />
@ -97,6 +98,7 @@
<ItemGroup>
<EmbeddedResource Include="Resources\Json.xshd" />
<EmbeddedResource Include="Resources\Ini.xshd" />
<EmbeddedResource Include="Resources\ULang.xshd" />
<EmbeddedResource Include="Resources\Xml.xshd" />
<EmbeddedResource Include="Resources\Cpp.xshd" />
<EmbeddedResource Include="Resources\Changelog.xshd" />

View File

@ -0,0 +1,19 @@
<SyntaxDefinition name="Ulang Visual Process Language" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008"
extensions=".ulang">
<Color name="Constant" foreground="#C792DD" />
<Color name="Field" foreground="#FFCB6B" />
<Color name="Tag1" foreground="#F07178" />
<Color name="Tag2" foreground="#7F848E" />
<Color name="Type" foreground="#C3E88D" />
<Color name="Punctuation" foreground="#89DDFF" />
<RuleSet>
<Rule color="Constant">\b(?:module|class|attribute)</Rule>
<Rule color="Field">\w+(?=(?:&lt;\w+&gt;)+\()</Rule>
<Rule color="Tag1">&lt;\w+&gt;</Rule>
<Rule color="Tag2">&lt;@\w+&gt;</Rule>
<Rule color="Type">(?!\()\w+(?=:)|\w+$|\w+(?=(?:&lt;\w+&gt;)+\s:=)</Rule>
<Rule color="Punctuation">[()*+,\-.\/:;&lt;=&gt;?[\]^`{|}~]</Rule>
</RuleSet>
</SyntaxDefinition>

View File

@ -16,6 +16,7 @@ using CUE4Parse.UE4.Assets.Exports;
using CUE4Parse.UE4.Assets.Exports.Animation;
using CUE4Parse.UE4.Assets.Exports.Material;
using CUE4Parse.UE4.Assets.Exports.SkeletalMesh;
using CUE4Parse.UE4.Assets.Exports.Solaris;
using CUE4Parse.UE4.Assets.Exports.Sound;
using CUE4Parse.UE4.Assets.Exports.StaticMesh;
using CUE4Parse.UE4.Assets.Exports.Texture;
@ -721,6 +722,15 @@ public class CUE4ParseViewModel : ViewModel
{
switch (export)
{
case USolarisDigest solarisDigest:
{
if (!TabControl.CanAddTabs) return false;
TabControl.AddTab($"{solarisDigest.ProjectName}.ulang");
TabControl.SelectedTab.Highlighter = AvalonExtensions.HighlighterSelector("ulang");
TabControl.SelectedTab.SetDocumentText(solarisDigest.ReadableCode, false);
return true;
}
case UTexture2D texture:
{
TabControl.SelectedTab.AddImage(texture);
@ -856,4 +866,4 @@ public class CUE4ParseViewModel : ViewModel
FLogger.AppendText($"Could not export '{fileName}'", Constants.WHITE, true);
}
}
}
}