Implement sounds on interaction
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user