Implement basic structure for noter
This commit is contained in:
@@ -1836,6 +1836,51 @@ function shared.Config.Init()
|
||||
--endregion
|
||||
end
|
||||
|
||||
-- Noter
|
||||
do
|
||||
local r, g, b, a = GetNextColor()
|
||||
local noterConfigFrame = GridFrame.new("HeimdallNoterConfig",
|
||||
UIParent, 12, 20)
|
||||
noterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||
configFrame:Add(noterConfigFrame, 5, 3)
|
||||
|
||||
local title = CreateFancyText("HeimdallNoterConfigTitle", noterConfigFrame.frame,
|
||||
shared.L[Heimdall_Data.config.locale].config.noter,
|
||||
{ r, g, b, a })
|
||||
noterConfigFrame:Add(title, 1, 8)
|
||||
|
||||
local debugButton = CreateBasicButton("HeimdallNoterConfigDebugButton",
|
||||
noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.debug, function()
|
||||
Heimdall_Data.config.noter.debug = not Heimdall_Data.config.noter.debug
|
||||
return Heimdall_Data.config.noter.debug
|
||||
end)
|
||||
debugButton:UpdateColor(Heimdall_Data.config.noter.debug)
|
||||
noterConfigFrame:Add(debugButton, 1, 4)
|
||||
|
||||
local enableButton = CreateBasicButton("HeimdallNoterConfigEnableButton",
|
||||
noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.enabled, function()
|
||||
Heimdall_Data.config.noter.enabled = not Heimdall_Data.config.noter.enabled
|
||||
return Heimdall_Data.config.noter.enabled
|
||||
end)
|
||||
enableButton:UpdateColor(Heimdall_Data.config.noter.enabled)
|
||||
noterConfigFrame:Add(enableButton, 2, 6)
|
||||
|
||||
local masterChannel = CreateBasicSmallEditBox("HeimdallNoterConfigMasterChannel",
|
||||
noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.masterChannel,
|
||||
Heimdall_Data.config.noter.masterChannel,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%S+") then
|
||||
Heimdall_Data.config.noter.masterChannel = text
|
||||
print("Master channel set to", tostring(text))
|
||||
else
|
||||
print("Invalid master channel", tostring(text))
|
||||
self:SetText(Heimdall_Data.config.noter.masterChannel)
|
||||
end
|
||||
end)
|
||||
noterConfigFrame:Add(masterChannel, 2, 6)
|
||||
end
|
||||
|
||||
-- Whisper Notify
|
||||
do
|
||||
local r, g, b, a = GetNextColor()
|
||||
|
||||
Reference in New Issue
Block a user