From 97b4b007660a1cde0df44873ccbc10d3d1a24b86 Mon Sep 17 00:00:00 2001 From: 4sval Date: Wed, 22 Jun 2022 00:06:13 +0200 Subject: [PATCH] reworked verse highlighter --- CUE4Parse | 2 +- FModel/Resources/ULang.xshd | 18 ++++++++++++------ FModel/Settings/UserSettings.cs | 16 +++++++--------- FModel/ViewModels/CUE4ParseViewModel.cs | 13 ++++--------- FModel/ViewModels/SettingsViewModel.cs | 1 - README.md | 2 +- 6 files changed, 25 insertions(+), 27 deletions(-) diff --git a/CUE4Parse b/CUE4Parse index 0a98d821..f3ed0ee2 160000 --- a/CUE4Parse +++ b/CUE4Parse @@ -1 +1 @@ -Subproject commit 0a98d821d8d0c93ead31bec576e27313efb2f9a5 +Subproject commit f3ed0ee2a8722d8709b77f050aaf9950ebf689e3 diff --git a/FModel/Resources/ULang.xshd b/FModel/Resources/ULang.xshd index 9a6ae384..7921e707 100644 --- a/FModel/Resources/ULang.xshd +++ b/FModel/Resources/ULang.xshd @@ -2,18 +2,24 @@ extensions=".ulang"> - + + + + - + - \b(?:module|class|attribute) - \w+(?=(?:<\w+>)+\() + \b(?:module|class|attribute|interface|struct|external|enum|where|comparable|component|void|type|subtype) + \w+(?:\'.*\')?(?=(?:<\w+>)+\() + \w+(?:\'.*\')?(?=(?:<\w+>)+\^?:) <\w+> - <@\w+> - (?!\()\w+(?=:)|\w+$|\w+(?=(?:<\w+>)+\s:=) + <@.*>|^using.* + (?!\()\w+(?=:) + \w+(?=(?:<\w+>)+\s:=) + (?<=:)[\w\[\]\?]+ [()*+,\-.\/:;<=>?[\]^`{|}~] diff --git a/FModel/Settings/UserSettings.cs b/FModel/Settings/UserSettings.cs index c9b29d9b..dc3c7206 100644 --- a/FModel/Settings/UserSettings.cs +++ b/FModel/Settings/UserSettings.cs @@ -102,8 +102,14 @@ namespace FModel.Settings set => SetProperty(ref _overwriteMapping, value); } - private bool _forceGame; + private string _mappingFilePath; + public string MappingFilePath + { + get => _mappingFilePath; + set => SetProperty(ref _mappingFilePath, value); + } + private bool _forceGame; public bool ForceGame { get => _forceGame; @@ -111,20 +117,12 @@ namespace FModel.Settings } private FGame _gameToForce; - public FGame GameToForce { get => _gameToForce; set => SetProperty(ref _gameToForce, value); } - private string _mappingFilePath; - public string MappingFilePath - { - get => _mappingFilePath; - set => SetProperty(ref _mappingFilePath, value); - } - private int _lastOpenedSettingTab; public int LastOpenedSettingTab { diff --git a/FModel/ViewModels/CUE4ParseViewModel.cs b/FModel/ViewModels/CUE4ParseViewModel.cs index a34b884d..b6e16a8a 100644 --- a/FModel/ViewModels/CUE4ParseViewModel.cs +++ b/FModel/ViewModels/CUE4ParseViewModel.cs @@ -103,15 +103,10 @@ public class CUE4ParseViewModel : ViewModel } default: { - if (UserSettings.Default.ForceGame == true) - { - Game = UserSettings.Default.GameToForce; - } - else - { - Game = gameDirectory.SubstringBeforeLast("\\Content").SubstringAfterLast("\\").ToEnum(FGame.Unknown); - } - + Game = UserSettings.Default.ForceGame ? + UserSettings.Default.GameToForce : + gameDirectory.SubstringBeforeLast("\\Content").SubstringAfterLast("\\").ToEnum(FGame.Unknown); + var versions = new VersionContainer(UserSettings.Default.OverridedGame[Game], UserSettings.Default.OverridedPlatform, customVersions: UserSettings.Default.OverridedCustomVersions[Game], optionOverrides: UserSettings.Default.OverridedOptions[Game]); diff --git a/FModel/ViewModels/SettingsViewModel.cs b/FModel/ViewModels/SettingsViewModel.cs index b90e1d85..0dad1c0f 100644 --- a/FModel/ViewModels/SettingsViewModel.cs +++ b/FModel/ViewModels/SettingsViewModel.cs @@ -83,7 +83,6 @@ public class SettingsViewModel : ViewModel } private EDiscordRpc _selectedDiscordRpc; - public EDiscordRpc SelectedDiscordRpc { get => _selectedDiscordRpc; diff --git a/README.md b/README.md index 48027068..bdba805c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Follow [our documentation](https://fmodel.app/docs#installation) ## Authors -- [@Asval](https://github.com/iAmAsval) +- [@Asval](https://github.com/4sval) - [@Fabian](https://github.com/FabianFG) - [@amr](https://github.com/Amrsatrio) - [@GMatrix](https://github.com/GMatrixGames)