Add config for bonkdetector
This commit is contained in:
@@ -1398,7 +1398,7 @@ function shared.Config.Init()
|
||||
local snifferConfigFrame = GridFrame.new("HeimdallSnifferConfig",
|
||||
UIParent, 12, 20)
|
||||
snifferConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||
configFrame:Add(snifferConfigFrame, 5, 3)
|
||||
configFrame:Add(snifferConfigFrame, 8, 3)
|
||||
|
||||
local title = CreateFancyText("HeimdallSnifferConfigTitle", snifferConfigFrame.frame,
|
||||
shared.L[Heimdall_Data.config.locale].config.sniffer,
|
||||
@@ -1474,6 +1474,66 @@ function shared.Config.Init()
|
||||
snifferConfigFrame:Add(zoneOverride, 2, 6)
|
||||
end
|
||||
|
||||
-- BonkDetector
|
||||
do
|
||||
local r, g, b, a = GetNextColor()
|
||||
local bonkDetectorConfigFrame = GridFrame.new("HeimdallBonkDetectorConfig",
|
||||
UIParent, 12, 20)
|
||||
bonkDetectorConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||
configFrame:Add(bonkDetectorConfigFrame, 7, 3)
|
||||
|
||||
local title = CreateFancyText("HeimdallBonkDetectorConfigTitle", bonkDetectorConfigFrame.frame,
|
||||
shared.L[Heimdall_Data.config.locale].config.bonkDetector,
|
||||
{ r, g, b, a })
|
||||
bonkDetectorConfigFrame:Add(title, 1, 8)
|
||||
|
||||
local debugButton = CreateBasicButton("HeimdallBonkDetectorConfigDebugButton",
|
||||
bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function()
|
||||
Heimdall_Data.config.bonkDetector.debug = not Heimdall_Data.config.bonkDetector.debug
|
||||
return Heimdall_Data.config.bonkDetector.debug
|
||||
end)
|
||||
debugButton:UpdateColor(Heimdall_Data.config.bonkDetector.debug)
|
||||
bonkDetectorConfigFrame:Add(debugButton, 1, 4)
|
||||
|
||||
local enableButton = CreateBasicButton("HeimdallBonkDetectorConfigEnableButton",
|
||||
bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function()
|
||||
Heimdall_Data.config.bonkDetector.enabled = not Heimdall_Data.config.bonkDetector.enabled
|
||||
return Heimdall_Data.config.bonkDetector.enabled
|
||||
end)
|
||||
enableButton:UpdateColor(Heimdall_Data.config.bonkDetector.enabled)
|
||||
bonkDetectorConfigFrame:Add(enableButton, 1, 12)
|
||||
|
||||
local notifyChannel = CreateBasicSmallEditBox("HeimdallBonkDetectorConfigNotifyChannel",
|
||||
bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.notifyChannel,
|
||||
Heimdall_Data.config.bonkDetector.notifyChannel,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%S+") then
|
||||
Heimdall_Data.config.bonkDetector.notifyChannel = text
|
||||
print("Notify channel set to", tostring(text))
|
||||
else
|
||||
print("Invalid notify channel", tostring(text))
|
||||
self:SetText(Heimdall_Data.config.bonkDetector.notifyChannel)
|
||||
end
|
||||
end)
|
||||
bonkDetectorConfigFrame:Add(notifyChannel, 2, 6)
|
||||
|
||||
local throttle = CreateBasicSmallEditBox("HeimdallBonkDetectorConfigThrottle",
|
||||
bonkDetectorConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.throttle,
|
||||
Heimdall_Data.config.bonkDetector.throttle,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%d+") then
|
||||
Heimdall_Data.config.bonkDetector.throttle = tonumber(text)
|
||||
print("Throttle set to", tostring(text))
|
||||
else
|
||||
print("Invalid throttle", tostring(text))
|
||||
self:SetText(Heimdall_Data.config.bonkDetector.throttle)
|
||||
end
|
||||
end)
|
||||
bonkDetectorConfigFrame:Add(throttle, 2, 6)
|
||||
end
|
||||
|
||||
-- Minimap Tagger
|
||||
do
|
||||
local r, g, b, a = GetNextColor()
|
||||
|
||||
2
_L.lua
2
_L.lua
@@ -21,6 +21,7 @@ shared.L = {
|
||||
alertSound = "Alert Sound",
|
||||
tagSound = "Tag Sound",
|
||||
alliance = "Alliance",
|
||||
bonkDetector = "Bonk Detector",
|
||||
cleanupInterval = "Cleanup Interval",
|
||||
combatAlerter = "Combat Alerter",
|
||||
combatSound = "Combat Sound",
|
||||
@@ -148,6 +149,7 @@ shared.L = {
|
||||
agentsAssist = "Агенты Ассисты",
|
||||
assist = "Ассист",
|
||||
kickOffline = "Кик Оффлайн",
|
||||
bonkDetector = "Детектор Ударов",
|
||||
},
|
||||
zones = {
|
||||
["Orgrimmar"] = "Оргриммар",
|
||||
|
||||
Reference in New Issue
Block a user