display faulted plugins as red with details tooltip
All checks were successful
Build / Compute Version (push) Successful in 4s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 8m23s
Build / Build Nuget package (NuGet) (push) Successful in 8m53s
Build / Build Nuget package (CringePlugins) (push) Successful in 10m28s
Build / Build Nuget package (SharedCringe) (push) Successful in 9m37s
Build / Build Launcher (push) Successful in 14m20s
All checks were successful
Build / Compute Version (push) Successful in 4s
Build / Build Nuget package (CringeBootstrap.Abstractions) (push) Successful in 8m23s
Build / Build Nuget package (NuGet) (push) Successful in 8m53s
Build / Build Nuget package (CringePlugins) (push) Successful in 10m28s
Build / Build Nuget package (SharedCringe) (push) Successful in 9m37s
Build / Build Launcher (push) Successful in 14m20s
This commit is contained in:
@@ -5,6 +5,7 @@ using CringePlugins.Abstractions;
|
||||
using CringePlugins.Config;
|
||||
using CringePlugins.Loader;
|
||||
using CringePlugins.Resolver;
|
||||
using CringePlugins.Utils;
|
||||
using ImGuiNET;
|
||||
using NLog;
|
||||
using NuGet;
|
||||
@@ -96,8 +97,18 @@ internal class PluginListComponent : IRenderComponent
|
||||
|
||||
TableNextColumn();
|
||||
BeginDisabled(!plugin.HasConfig);
|
||||
if (plugin.WrappedInstance?.LastException is not null)
|
||||
PushStyleColor(plugin.HasConfig ? ImGuiCol.Text : ImGuiCol.TextDisabled,
|
||||
plugin.HasConfig ? Color.Red.ToFloat4() : Color.DarkRed.ToFloat4());
|
||||
if (Selectable(plugin.Metadata.Name, false, ImGuiSelectableFlags.SpanAllColumns))
|
||||
plugin.OpenConfig();
|
||||
if (plugin.WrappedInstance?.LastException is not null)
|
||||
{
|
||||
PopStyleColor();
|
||||
if (IsItemHovered(ImGuiHoveredFlags.ForTooltip))
|
||||
SetTooltip(
|
||||
$"{plugin.WrappedInstance.LastException.GetType()}: {plugin.WrappedInstance.LastException.Message}");
|
||||
}
|
||||
EndDisabled();
|
||||
TableNextColumn();
|
||||
Text(plugin.Metadata.Version.ToString());
|
||||
|
Reference in New Issue
Block a user