muffin v7.4

This commit is contained in:
alydev 2025-12-18 00:49:57 +10:00
parent 8a7847ff37
commit a4175abacd
54 changed files with 95984 additions and 123967 deletions

View file

@ -2,22 +2,17 @@ using System;
using System.Linq;
using Dalamud.Bindings.ImGui;
using Dalamud.Game.Text;
using Dalamud.Interface.Components;
using Dalamud.Interface.Utility.Raii;
using Dalamud.Plugin;
using Dalamud.Utility;
using Questionable.External;
namespace Questionable.Windows.ConfigComponents;
internal sealed class NotificationConfigComponent : ConfigComponent
{
private readonly NotificationMasterIpc _notificationMasterIpc;
public NotificationConfigComponent(IDalamudPluginInterface pluginInterface, Configuration configuration, NotificationMasterIpc notificationMasterIpc)
public NotificationConfigComponent(IDalamudPluginInterface pluginInterface, Configuration configuration)
: base(pluginInterface, configuration)
{
_notificationMasterIpc = notificationMasterIpc;
}
public override void DrawTab()
@ -41,31 +36,12 @@ internal sealed class NotificationConfigComponent : ConfigComponent
where x != XivChatType.StandardEmote
select x).ToArray();
int currentItem = Array.IndexOf(array, base.Configuration.Notifications.ChatType);
string[] items = array.Select((XivChatType t) => t.GetAttribute<XivChatTypeInfoAttribute>()?.FancyName ?? t.ToString()).ToArray();
if (ImGui.Combo("Chat channel", ref currentItem, in items, items.Length))
string[] array2 = array.Select((XivChatType t) => t.GetAttribute<XivChatTypeInfoAttribute>()?.FancyName ?? t.ToString()).ToArray();
if (ImGui.Combo((ImU8String)"Chat channel", ref currentItem, (ReadOnlySpan<string>)array2, array2.Length))
{
base.Configuration.Notifications.ChatType = array[currentItem];
Save();
}
ImGui.Separator();
ImGui.Text("NotificationMaster settings");
ImGui.SameLine();
ImGuiComponents.HelpMarker("Requires the plugin 'NotificationMaster' to be installed.");
using (ImRaii.Disabled(!_notificationMasterIpc.Enabled))
{
bool v2 = base.Configuration.Notifications.ShowTrayMessage;
if (ImGui.Checkbox("Show tray notification", ref v2))
{
base.Configuration.Notifications.ShowTrayMessage = v2;
Save();
}
bool v3 = base.Configuration.Notifications.FlashTaskbar;
if (ImGui.Checkbox("Flash taskbar icon", ref v3))
{
base.Configuration.Notifications.FlashTaskbar = v3;
Save();
}
}
}
}
}