Skip to content

Commit

Permalink
Merge pull request #175 from PhantomGamers/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomGamers authored Nov 19, 2023
2 parents 441a06a + a84a3c3 commit 7abf79f
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 25 deletions.
6 changes: 3 additions & 3 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<PackageVersion Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)" />
<PackageVersion Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" />
<PackageVersion Include="Flurl.Http" Version="4.0.0-pre4" />
<PackageVersion Include="Flurl.Http" Version="4.0.0-pre6" />
<PackageVersion Include="PuppeteerSharp" Version="6.2.0" />
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.1" />
<PackageVersion Include="Semver" Version="2.3.0" />
<PackageVersion Include="PortableJsonSettingsProvider" Version="0.2.2" />
<PackageVersion Include="Gameloop.Vdf" Version="0.6.2" />
<PackageVersion Include="NLog" Version="5.2.5" />
<PackageVersion Include="NLog" Version="5.2.6" />
<PackageVersion Include="MinVer" Version="4.3.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Expand All @@ -29,7 +29,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageVersion>
<PackageVersion Include="FileWatcherEx" Version="2.5.0" />
<PackageVersion Include="FileWatcherEx" Version="2.6.0" />
<PackageVersion Include="FluentAvaloniaUI" Version="2.0.4" />
<PackageVersion Include="WindowsShortcutFactory" Version="1.1.0" />
<PackageVersion Include="WmiLight" Version="4.0.0" />
Expand Down
12 changes: 12 additions & 0 deletions SFP/Models/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,16 @@ public static List<string> GetCommandLine(Process? process)

return new List<string>();
}

public static string ConvertARGBtoRGBA(string argb)
{
if (argb.Length != 9 || !argb.StartsWith("#"))
{
throw new ArgumentException("Invalid ARGB format");
}
var alpha = argb.Substring(1, 2);
var rgb = argb[3..];
return "#" + rgb + alpha;
}

}
18 changes: 9 additions & 9 deletions SFP/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
},
"FileWatcherEx": {
"type": "Direct",
"requested": "[2.5.0, )",
"resolved": "2.5.0",
"contentHash": "XmNJt94gt/xlr0RY5w6gKcZhwQ2wNSA7j+VqakpEHY3kk8dXVnYShNZMBVyEPUcDdCzFrI+4d7BvGnmDHB/m/w=="
"requested": "[2.6.0, )",
"resolved": "2.6.0",
"contentHash": "zHDfVCmqguDYzcRhUmsAzUVBMm5G3nvkD5+p3/f5TjqPHcxFvDoEfSKvxZ4/Mid6fVDZJOU+7xxittk+AIE2Bw=="
},
"Flurl.Http": {
"type": "Direct",
"requested": "[4.0.0-pre4, )",
"resolved": "4.0.0-pre4",
"contentHash": "gK20RSLGp1QBG7FCgu6/pmUUmhP6FGIRU0LBWWHdhTDicdHq760jP9QdD6UPyaVMLlhJrvwrSZ4HHLkHT8ZrjQ==",
"requested": "[4.0.0-pre6, )",
"resolved": "4.0.0-pre6",
"contentHash": "YwWbb/egekWqLmoYZLY2PTzwmN4l6/C4iQKuUsWuNrjxYQ84Oa+OBfQzPYx+04lpOAhhjoBeXFB8y7C+F0CpJA==",
"dependencies": {
"Flurl": "4.0.0-pre4"
}
Expand All @@ -54,9 +54,9 @@
},
"NLog": {
"type": "Direct",
"requested": "[5.2.5, )",
"resolved": "5.2.5",
"contentHash": "mMXtbAxfNzqkXcBjhJ3wN3rH7kwUZ0JL0GrUBI/lso7+tQ/HC4e5SnlmR3R5qQ9zWbqMbjxeH37rIf0yQGWTiA=="
"requested": "[5.2.6, )",
"resolved": "5.2.6",
"contentHash": "7/RQ4VBu6HT6kieczhwfI52ugcxrsrMNWIGy43Q36SdfN5dApZW7otsgXuIXx2rKspIGkPhD99JVWIs6FtIilA=="
},
"PortableJsonSettingsProvider": {
"type": "Direct",
Expand Down
6 changes: 5 additions & 1 deletion SFP_UI/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,20 @@ private static IEnumerable<string> GetColorValues()
{
if (Current!.Styles[0] is not FluentAvaloniaTheme faTheme)
{
Log.Logger.Warn("Could not get color values, FluentAvaloniaTheme is null");
return Array.Empty<string>();
}
var colorValues = new string[7];
for (var i = 0; i < 7; i++)
{
if (!faTheme.Resources.TryGetResource(Injector.ColorNames[i], null, out var c))
{
Log.Logger.Warn("Could not get color value for {ColorName}", Injector.ColorNames[i]);
continue;
}
colorValues[i] = c?.ToString() ?? colorValues[i];

var rgbaStr = Utils.ConvertARGBtoRGBA(c!.ToString()!);
colorValues[i] = rgbaStr;
}

return colorValues;
Expand Down
24 changes: 12 additions & 12 deletions SFP_UI/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
},
"NLog": {
"type": "Direct",
"requested": "[5.2.5, )",
"resolved": "5.2.5",
"contentHash": "mMXtbAxfNzqkXcBjhJ3wN3rH7kwUZ0JL0GrUBI/lso7+tQ/HC4e5SnlmR3R5qQ9zWbqMbjxeH37rIf0yQGWTiA=="
"requested": "[5.2.6, )",
"resolved": "5.2.6",
"contentHash": "7/RQ4VBu6HT6kieczhwfI52ugcxrsrMNWIGy43Q36SdfN5dApZW7otsgXuIXx2rKspIGkPhD99JVWIs6FtIilA=="
},
"ReactiveUI.Fody": {
"type": "Direct",
Expand Down Expand Up @@ -1525,10 +1525,10 @@
"sfp": {
"type": "Project",
"dependencies": {
"FileWatcherEx": "[2.5.0, )",
"Flurl.Http": "[4.0.0-pre4, )",
"FileWatcherEx": "[2.6.0, )",
"Flurl.Http": "[4.0.0-pre6, )",
"Gameloop.Vdf": "[0.6.2, )",
"NLog": "[5.2.5, )",
"NLog": "[5.2.6, )",
"PortableJsonSettingsProvider": "[0.2.2, )",
"PuppeteerSharp": "[6.2.0, )",
"WindowsShortcutFactory": "[1.1.0, )",
Expand All @@ -1537,15 +1537,15 @@
},
"FileWatcherEx": {
"type": "CentralTransitive",
"requested": "[2.5.0, )",
"resolved": "2.5.0",
"contentHash": "XmNJt94gt/xlr0RY5w6gKcZhwQ2wNSA7j+VqakpEHY3kk8dXVnYShNZMBVyEPUcDdCzFrI+4d7BvGnmDHB/m/w=="
"requested": "[2.6.0, )",
"resolved": "2.6.0",
"contentHash": "zHDfVCmqguDYzcRhUmsAzUVBMm5G3nvkD5+p3/f5TjqPHcxFvDoEfSKvxZ4/Mid6fVDZJOU+7xxittk+AIE2Bw=="
},
"Flurl.Http": {
"type": "CentralTransitive",
"requested": "[4.0.0-pre4, )",
"resolved": "4.0.0-pre4",
"contentHash": "gK20RSLGp1QBG7FCgu6/pmUUmhP6FGIRU0LBWWHdhTDicdHq760jP9QdD6UPyaVMLlhJrvwrSZ4HHLkHT8ZrjQ==",
"requested": "[4.0.0-pre6, )",
"resolved": "4.0.0-pre6",
"contentHash": "YwWbb/egekWqLmoYZLY2PTzwmN4l6/C4iQKuUsWuNrjxYQ84Oa+OBfQzPYx+04lpOAhhjoBeXFB8y7C+F0CpJA==",
"dependencies": {
"Flurl": "4.0.0-pre4"
}
Expand Down

0 comments on commit 7abf79f

Please sign in to comment.