Rework who queries out to config
This commit is contained in:
@@ -657,7 +657,7 @@ function shared.Config.Init()
|
||||
local whoerConfigFrame = GridFrame.new("HeimdallWhoerConfig",
|
||||
UIParent, 12, 20)
|
||||
whoerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||
configFrame:Add(whoerConfigFrame, 16, 3)
|
||||
configFrame:Add(whoerConfigFrame, 16, 6)
|
||||
|
||||
local title = CreateFancyText("HeimdallWhoerConfigTitle", whoerConfigFrame.frame,
|
||||
shared.L[Heimdall_Data.config.locale].config.whoer, { r, g, b, a })
|
||||
@@ -676,7 +676,7 @@ function shared.Config.Init()
|
||||
return Heimdall_Data.config.who.enabled
|
||||
end)
|
||||
enableButton:UpdateColor(Heimdall_Data.config.who.enabled)
|
||||
whoerConfigFrame:Add(enableButton, 1, 6)
|
||||
whoerConfigFrame:Add(enableButton, 2, 3)
|
||||
|
||||
local doWhisperButton = CreateBasicButton("HeimdallWhoerConfigDoWhisperButton",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.doWhisper, function()
|
||||
@@ -684,7 +684,7 @@ function shared.Config.Init()
|
||||
return Heimdall_Data.config.who.doWhisper
|
||||
end)
|
||||
doWhisperButton:UpdateColor(Heimdall_Data.config.who.doWhisper)
|
||||
whoerConfigFrame:Add(doWhisperButton, 1, 6)
|
||||
whoerConfigFrame:Add(doWhisperButton, 2, 3)
|
||||
|
||||
local notifyChannel = CreateBasicSmallEditBox("HeimdallWhoerConfigNotifyChannel",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.notifyChannel,
|
||||
@@ -699,7 +699,7 @@ function shared.Config.Init()
|
||||
self:SetText(Heimdall_Data.config.who.notifyChannel)
|
||||
end
|
||||
end)
|
||||
whoerConfigFrame:Add(notifyChannel, 2, 6)
|
||||
whoerConfigFrame:Add(notifyChannel, 2, 3)
|
||||
|
||||
local ttl = CreateBasicSmallEditBox("HeimdallWhoerConfigTTL",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ttl,
|
||||
@@ -714,7 +714,7 @@ function shared.Config.Init()
|
||||
self:SetText(Heimdall_Data.config.who.ttl)
|
||||
end
|
||||
end)
|
||||
whoerConfigFrame:Add(ttl, 2, 6)
|
||||
whoerConfigFrame:Add(ttl, 2, 3)
|
||||
|
||||
local ignored = CreateBasicBigEditBox("HeimdallWhoerConfigIgnored",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.ignored,
|
||||
@@ -723,7 +723,7 @@ function shared.Config.Init()
|
||||
local ignored = StringToMap(self:GetText(), "\n")
|
||||
Heimdall_Data.config.who.ignored = ignored
|
||||
end)
|
||||
whoerConfigFrame:Add(ignored, 6, 6)
|
||||
whoerConfigFrame:Add(ignored, 4, 6)
|
||||
|
||||
local zoneNotifyFor = CreateBasicBigEditBox("HeimdallWhoerConfigZoneNotifyFor",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneNotifyFor,
|
||||
@@ -732,7 +732,16 @@ function shared.Config.Init()
|
||||
local zoneNotifyFor = StringToMap(self:GetText(), "\n")
|
||||
Heimdall_Data.config.who.zoneNotifyFor = zoneNotifyFor
|
||||
end)
|
||||
whoerConfigFrame:Add(zoneNotifyFor, 6, 6)
|
||||
whoerConfigFrame:Add(zoneNotifyFor, 4, 6)
|
||||
|
||||
local whoQueries = CreateBasicBigEditBox("HeimdallWhoerConfigQueries",
|
||||
whoerConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.queries,
|
||||
shared.WhoQueryService.WhoQueriesToString(Heimdall_Data.config.who.queries or {}),
|
||||
function(self)
|
||||
local queries = shared.WhoQueryService.WhoQueriesFromString(self:GetText())
|
||||
Heimdall_Data.config.who.queries = queries
|
||||
end)
|
||||
whoerConfigFrame:Add(whoQueries, 4, 6)
|
||||
end
|
||||
|
||||
-- Messenger
|
||||
|
||||
Reference in New Issue
Block a user