Add settings window display when NoSnap activated
This commit is contained in:
@@ -33,6 +33,7 @@ public sealed class NoSnapService : IHostedService, IMediatorSubscriber
|
||||
private readonly RemoteConfigurationService _remoteConfig;
|
||||
|
||||
public static bool AnyLoaded { get; private set; } = false;
|
||||
public static string ActivePlugins { get; private set; } = string.Empty;
|
||||
|
||||
public MareMediator Mediator { get; init; }
|
||||
|
||||
@@ -215,6 +216,11 @@ public sealed class NoSnapService : IHostedService, IMediatorSubscriber
|
||||
var pluginList = string.Join(", ", _listOfPlugins.Where(p => p.Value).Select(p => p.Key));
|
||||
Mediator.Publish(new NotificationMessage("Incompatible plugin loaded", $"Synced player appearances will not apply until incompatible plugins are disabled: {pluginList}.",
|
||||
NotificationType.Error));
|
||||
ActivePlugins = pluginList;
|
||||
}
|
||||
else
|
||||
{
|
||||
ActivePlugins = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -852,6 +852,16 @@ public partial class UiSharedService : DisposableMediatorSubscriberBase
|
||||
ImGui.TextColored(ImGuiColors.DalamudRed, "You need to install both Penumbra and Glamourer and keep them up to date to use Loporrit.");
|
||||
return false;
|
||||
}
|
||||
else if (NoSnapService.AnyLoaded)
|
||||
{
|
||||
IconText(FontAwesomeIcon.ExclamationTriangle, ImGuiColors.DalamudYellow);
|
||||
ImGui.SameLine();
|
||||
var cursorX = ImGui.GetCursorPosX();
|
||||
ImGui.TextColored(ImGuiColors.DalamudYellow, "Synced player appearances will not apply until incompatible plugins are disabled:");
|
||||
ImGui.SetCursorPosX(cursorX + 16.0f);
|
||||
ImGui.TextColored(ImGuiColors.DalamudYellow, NoSnapService.ActivePlugins);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user