From 1585f199892b43903aaa2ba30abb46b5b0318c00 Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sun, 3 Nov 2024 20:28:57 +0700 Subject: [PATCH] fix --- CringeBootstrap/packages.lock.json | 18 ++++++++++++++++++ CringeLauncher/CringeLauncher.csproj | 2 ++ CringeLauncher/packages.lock.json | 18 ++++++++++++++++++ CringePlugins/Resolver/BuiltInPackages.cs | 2 +- CringePlugins/Ui/PluginListComponent.cs | 7 ++++--- 5 files changed, 43 insertions(+), 4 deletions(-) diff --git a/CringeBootstrap/packages.lock.json b/CringeBootstrap/packages.lock.json index 6e64bb9..ed7d81e 100644 --- a/CringeBootstrap/packages.lock.json +++ b/CringeBootstrap/packages.lock.json @@ -29,6 +29,22 @@ "NuGet.Versioning": "6.10.1" } }, + "Basic.Reference.Assemblies.Net80": { + "type": "Transitive", + "resolved": "1.7.9", + "contentHash": "1wbS9ZJLFVrKD2jqv27gekIrpjpLffR9sitLQh5drWoG9KbyR/CgrAhw5I0c8Eq3zFMOToCmrpZi3VpRoInCgg==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "4.11.0" + } + }, + "Basic.Reference.Assemblies.Net80Windows": { + "type": "Transitive", + "resolved": "1.7.9", + "contentHash": "98GFm8MC+pv37rTHaxBm5KFucqdJj0jK0XRHSGt2sXK9HNqtGImIFCFahxjUzskQjiUkPAzVhTou2OYZOuhhEg==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "4.11.0" + } + }, "dnlib": { "type": "Transitive", "resolved": "4.4.0", @@ -1300,6 +1316,8 @@ "cringelauncher": { "type": "Project", "dependencies": { + "Basic.Reference.Assemblies.Net80": "[1.7.9, )", + "Basic.Reference.Assemblies.Net80Windows": "[1.7.9, )", "CringeBootstrap.Abstractions": "[1.0.0, )", "CringePlugins": "[1.0.0, )", "Microsoft.CodeAnalysis.CSharp": "[4.11.0, )", diff --git a/CringeLauncher/CringeLauncher.csproj b/CringeLauncher/CringeLauncher.csproj index 0a960ee..54c44a1 100644 --- a/CringeLauncher/CringeLauncher.csproj +++ b/CringeLauncher/CringeLauncher.csproj @@ -22,6 +22,8 @@ + + all diff --git a/CringeLauncher/packages.lock.json b/CringeLauncher/packages.lock.json index d2c8f29..7fe1c96 100644 --- a/CringeLauncher/packages.lock.json +++ b/CringeLauncher/packages.lock.json @@ -2,6 +2,24 @@ "version": 1, "dependencies": { "net8.0-windows10.0.19041": { + "Basic.Reference.Assemblies.Net80": { + "type": "Direct", + "requested": "[1.7.9, )", + "resolved": "1.7.9", + "contentHash": "1wbS9ZJLFVrKD2jqv27gekIrpjpLffR9sitLQh5drWoG9KbyR/CgrAhw5I0c8Eq3zFMOToCmrpZi3VpRoInCgg==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "4.11.0" + } + }, + "Basic.Reference.Assemblies.Net80Windows": { + "type": "Direct", + "requested": "[1.7.9, )", + "resolved": "1.7.9", + "contentHash": "98GFm8MC+pv37rTHaxBm5KFucqdJj0jK0XRHSGt2sXK9HNqtGImIFCFahxjUzskQjiUkPAzVhTou2OYZOuhhEg==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "4.11.0" + } + }, "dnlib": { "type": "Direct", "requested": "[4.4.0, )", diff --git a/CringePlugins/Resolver/BuiltInPackages.cs b/CringePlugins/Resolver/BuiltInPackages.cs index 0715e69..050605d 100644 --- a/CringePlugins/Resolver/BuiltInPackages.cs +++ b/CringePlugins/Resolver/BuiltInPackages.cs @@ -56,7 +56,7 @@ public static class BuiltInPackages FromAssembly(runtimeFramework, [se.AsDependency(), imGui.AsDependency(), harmony.AsDependency()] #if DEBUG - , version: new(0, 1, 4) + , version: new(0, 1, 21) #endif ), ]; diff --git a/CringePlugins/Ui/PluginListComponent.cs b/CringePlugins/Ui/PluginListComponent.cs index 9323aa0..65123a8 100644 --- a/CringePlugins/Ui/PluginListComponent.cs +++ b/CringePlugins/Ui/PluginListComponent.cs @@ -46,12 +46,13 @@ internal class PluginListComponent : IRenderComponent _packages = packagesConfig.Packages.ToImmutableDictionary(b => b.Id, b => b.Range, StringComparer.OrdinalIgnoreCase); - MyGuiSandbox.GuiControlCreated += GuiControlCreated; + MyScreenManager.ScreenAdded += ScreenChanged; + MyScreenManager.ScreenRemoved += ScreenChanged; } - private void GuiControlCreated(object obj) + private void ScreenChanged(MyGuiScreenBase screen) { - _open = obj is MyGuiScreenMainMenu && MyGuiScreenGamePlay.Static is null; + _open = MyScreenManager.GetScreenWithFocus() is MyGuiScreenMainMenu && MyGuiScreenGamePlay.Static is null; } public void OnFrame()