reworked verse highlighter

This commit is contained in:
4sval 2022-06-22 00:06:13 +02:00
parent 6bc02bfb13
commit 97b4b00766
6 changed files with 25 additions and 27 deletions

@ -1 +1 @@
Subproject commit 0a98d821d8d0c93ead31bec576e27313efb2f9a5
Subproject commit f3ed0ee2a8722d8709b77f050aaf9950ebf689e3

View File

@ -2,18 +2,24 @@
extensions=".ulang">
<Color name="Constant" foreground="#C792DD" />
<Color name="Field" foreground="#FFCB6B" />
<Color name="Method" foreground="#FFCB6B" />
<Color name="Variable" foreground="#529EFF" />
<Color name="Tag1" foreground="#F07178" />
<Color name="Tag2" foreground="#7F848E" />
<Color name="Parameter" foreground="#89DDFF" />
<Color name="Class" foreground="#FF9D5E" />
<Color name="Type" foreground="#C3E88D" />
<Color name="Punctuation" foreground="#89DDFF" />
<Color name="Punctuation" foreground="#E5C07B" />
<RuleSet>
<Rule color="Constant">\b(?:module|class|attribute)</Rule>
<Rule color="Field">\w+(?=(?:&lt;\w+&gt;)+\()</Rule>
<Rule color="Constant">\b(?:module|class|attribute|interface|struct|external|enum|where|comparable|component|void|type|subtype)</Rule>
<Rule color="Method">\w+(?:\'.*\')?(?=(?:&lt;\w+&gt;)+\()</Rule>
<Rule color="Variable">\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="Tag2">&lt;@.*&gt;|^using.*</Rule>
<Rule color="Parameter">(?!\()\w+(?=:)</Rule>
<Rule color="Class">\w+(?=(?:&lt;\w+&gt;)+\s:=)</Rule>
<Rule color="Type">(?&lt;=:)[\w\[\]\?]+</Rule>
<Rule color="Punctuation">[()*+,\-.\/:;&lt;=&gt;?[\]^`{|}~]</Rule>
</RuleSet>
</SyntaxDefinition>

View File

@ -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
{

View File

@ -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]);

View File

@ -83,7 +83,6 @@ public class SettingsViewModel : ViewModel
}
private EDiscordRpc _selectedDiscordRpc;
public EDiscordRpc SelectedDiscordRpc
{
get => _selectedDiscordRpc;

View File

@ -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)