Implement sounds on interaction

This commit is contained in:
Infi
2024-04-16 00:36:30 +02:00
parent 230e63033d
commit 30ccf8e416
6 changed files with 61 additions and 5 deletions
+9
View File
@@ -13,6 +13,7 @@ using Dalamud.Interface.Internal;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.Utility;
using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Component.GUI;
using ImGuiNET;
using Lumina.Excel;
@@ -40,6 +41,8 @@ public sealed class PayloadHandler {
private readonly ExcelSheet<TerritoryType> TerritorySheet;
private readonly ExcelSheet<EventItemHelp> EventItemHelpSheet;
private uint PopupSfx = 1u;
internal PayloadHandler(ChatLogWindow logWindow)
{
LogWindow = logWindow;
@@ -206,6 +209,9 @@ public sealed class PayloadHandler {
internal void Click(Chunk chunk, Payload? payload, ImGuiMouseButton button)
{
if (LogWindow.Plugin.Config.PlaySounds)
UIModule.PlaySound(PopupSfx);
switch (button)
{
case ImGuiMouseButton.Left:
@@ -408,6 +414,9 @@ public sealed class PayloadHandler {
case URIPayload uri:
TryOpenURI(uri.Uri);
break;
default:
RightClickPayload(chunk, payload);
break;
}
}