From c0037bfd845a70197baf696f25751f10e18a9ca3 Mon Sep 17 00:00:00 2001 From: Ludovicus Date: Sat, 19 Oct 2019 17:07:38 -0400 Subject: [PATCH] #35: Add control of sound channel to play ping through. --- TomTom.lua | 3 ++- TomTom_Config.lua | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index c5c1e9f..3ebe727 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -77,6 +77,7 @@ function TomTom:Initialize(event, addon) setclosest = true, closestusecontinent = false, enablePing = false, + pingChannel = "SFX", hideDuringPetBattles = true, }, minimap = { @@ -773,7 +774,7 @@ end local function _both_ping_arrival(event, uid, range, distance, lastdistance) if TomTom.profile.arrow.enablePing then - PlaySoundFile("Interface\\AddOns\\TomTom\\Media\\ping.mp3") + PlaySoundFile("Interface\\AddOns\\TomTom\\Media\\ping.mp3", TomTom.profile.arrow.pingChannel) end end diff --git a/TomTom_Config.lua b/TomTom_Config.lua index 7a615a3..70d7993 100755 --- a/TomTom_Config.lua +++ b/TomTom_Config.lua @@ -228,7 +228,7 @@ local function createconfig() type = "range", name = L["\"Arrival Distance\""], desc = L["This setting will control the distance at which the waypoint arrow switches to a downwards arrow, indicating you have arrived at your destination"], - min = 0, max = 150, step = 5, + min = 0, max = 150, step = 1, width = "double", arg = "arrow.arrival", }, @@ -240,6 +240,21 @@ local function createconfig() width = "double", arg = "arrow.enablePing", }, + setPingChannel = { + order = 12, + type = "select", + name = L["Channel to play the ping through"], + desc = L["When a 'ping' is played, use the indicated sound channel so the volume can be controlled."], + width = "double", + values = { + ["Master"] = MASTER_VOLUME, + ["SFX"] = SOUND_VOLUME, + ["Music"] = MUSIC_VOLUME, + ["Ambience"] = AMBIENCE_VOLUME, + ["Dialog"] = DIALOG_VOLUME + }, + arg = "arrow.pingChannel", + }, hideDuringPetBattles = { order = 13, type = "toggle", -- 1.7.9.5