From 921dfb734cc909ff446d2ce7be313ccc7d3eb0cc Mon Sep 17 00:00:00 2001 From: zznty <94796179+zznty@users.noreply.github.com> Date: Sun, 3 Nov 2024 20:02:56 +0700 Subject: [PATCH] allow opening plugin config window in installed plugins tab --- CringePlugins/Ui/PluginListComponent.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CringePlugins/Ui/PluginListComponent.cs b/CringePlugins/Ui/PluginListComponent.cs index 1888f47..9323aa0 100644 --- a/CringePlugins/Ui/PluginListComponent.cs +++ b/CringePlugins/Ui/PluginListComponent.cs @@ -94,11 +94,12 @@ internal class PluginListComponent : IRenderComponent TableNextRow(); TableNextColumn(); - Text(plugin.Metadata.Name); + BeginDisabled(!plugin.HasConfig); + if (Selectable(plugin.Metadata.Name, false, ImGuiSelectableFlags.SpanAllColumns)) + plugin.OpenConfig(); + EndDisabled(); TableNextColumn(); Text(plugin.Metadata.Version.ToString()); - - //todo: use plugin.HasConfig and plugin.OpenConfig() } EndTable();