mirror of
https://github.com/4sval/FModel.git
synced 2026-08-25 02:44:29 -05:00
ulang reader
This commit is contained in:
Submodule CUE4Parse updated: 06d2998e55...d2d8fe2e3e
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<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" />
|
||||
|
||||
19
FModel/Resources/ULang.xshd
Normal file
19
FModel/Resources/ULang.xshd
Normal 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+(?=(?:<\w+>)+\()</Rule>
|
||||
<Rule color="Tag1"><\w+></Rule>
|
||||
<Rule color="Tag2"><@\w+></Rule>
|
||||
<Rule color="Type">(?!\()\w+(?=:)|\w+$|\w+(?=(?:<\w+>)+\s:=)</Rule>
|
||||
<Rule color="Punctuation">[()*+,\-.\/:;<=>?[\]^`{|}~]</Rule>
|
||||
</RuleSet>
|
||||
</SyntaxDefinition>
|
||||
@@ -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;
|
||||
@@ -713,6 +714,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);
|
||||
@@ -848,4 +858,4 @@ public class CUE4ParseViewModel : ViewModel
|
||||
FLogger.AppendText($"Could not export '{fileName}'", Constants.WHITE, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user