added chat report functionality and some other random stuff
This commit is contained in:
@@ -15,6 +15,7 @@ using Dalamud.Plugin.Services;
|
||||
using Dalamud.Utility;
|
||||
using LightlessSync.FileCache;
|
||||
using LightlessSync.Interop.Ipc;
|
||||
using LightlessSync.Interop.Ipc.Framework;
|
||||
using LightlessSync.LightlessConfiguration;
|
||||
using LightlessSync.LightlessConfiguration.Models;
|
||||
using LightlessSync.Localization;
|
||||
@@ -975,36 +976,36 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
|
||||
ImGui.SameLine(150);
|
||||
ColorText("Penumbra", GetBoolColor(_penumbraExists));
|
||||
AttachToolTip($"Penumbra is " + (_penumbraExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Penumbra", _penumbraExists, _ipcManager.Penumbra.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("Glamourer", GetBoolColor(_glamourerExists));
|
||||
AttachToolTip($"Glamourer is " + (_glamourerExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Glamourer", _glamourerExists, _ipcManager.Glamourer.State));
|
||||
|
||||
ImGui.TextUnformatted("Optional Plugins:");
|
||||
ImGui.SameLine(150);
|
||||
ColorText("SimpleHeels", GetBoolColor(_heelsExists));
|
||||
AttachToolTip($"SimpleHeels is " + (_heelsExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("SimpleHeels", _heelsExists, _ipcManager.Heels.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("Customize+", GetBoolColor(_customizePlusExists));
|
||||
AttachToolTip($"Customize+ is " + (_customizePlusExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Customize+", _customizePlusExists, _ipcManager.CustomizePlus.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("Honorific", GetBoolColor(_honorificExists));
|
||||
AttachToolTip($"Honorific is " + (_honorificExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Honorific", _honorificExists, _ipcManager.Honorific.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("Moodles", GetBoolColor(_moodlesExists));
|
||||
AttachToolTip($"Moodles is " + (_moodlesExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Moodles", _moodlesExists, _ipcManager.Moodles.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("PetNicknames", GetBoolColor(_petNamesExists));
|
||||
AttachToolTip($"PetNicknames is " + (_petNamesExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("PetNicknames", _petNamesExists, _ipcManager.PetNames.State));
|
||||
|
||||
ImGui.SameLine();
|
||||
ColorText("Brio", GetBoolColor(_brioExists));
|
||||
AttachToolTip($"Brio is " + (_brioExists ? "available and up to date." : "unavailable or not up to date."));
|
||||
AttachToolTip(BuildPluginTooltip("Brio", _brioExists, _ipcManager.Brio.State));
|
||||
|
||||
if (!_penumbraExists || !_glamourerExists)
|
||||
{
|
||||
@@ -1015,6 +1016,25 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
return true;
|
||||
}
|
||||
|
||||
private static string BuildPluginTooltip(string pluginName, bool isAvailable, IpcConnectionState state)
|
||||
{
|
||||
var availability = isAvailable ? "available and up to date." : "unavailable or not up to date.";
|
||||
return $"{pluginName} is {availability}{Environment.NewLine}IPC State: {DescribeIpcState(state)}";
|
||||
}
|
||||
|
||||
private static string DescribeIpcState(IpcConnectionState state)
|
||||
=> state switch
|
||||
{
|
||||
IpcConnectionState.Unknown => "Not evaluated yet",
|
||||
IpcConnectionState.MissingPlugin => "Plugin not installed",
|
||||
IpcConnectionState.VersionMismatch => "Installed version below required minimum",
|
||||
IpcConnectionState.PluginDisabled => "Plugin installed but disabled",
|
||||
IpcConnectionState.NotReady => "Plugin is not ready yet",
|
||||
IpcConnectionState.Available => "Available",
|
||||
IpcConnectionState.Error => "Error occurred while checking IPC",
|
||||
_ => state.ToString()
|
||||
};
|
||||
|
||||
public int DrawServiceSelection(bool selectOnChange = false, bool showConnect = true)
|
||||
{
|
||||
string[] comboEntries = _serverConfigurationManager.GetServerNames();
|
||||
|
||||
Reference in New Issue
Block a user