Implement printing last N notes

This commit is contained in:
2025-01-15 11:50:35 +01:00
parent 75a84baa42
commit ec2f146095
4 changed files with 42 additions and 5 deletions

View File

@@ -1863,7 +1863,7 @@ function shared.Config.Init()
return Heimdall_Data.config.noter.enabled
end)
enableButton:UpdateColor(Heimdall_Data.config.noter.enabled)
noterConfigFrame:Add(enableButton, 2, 6)
noterConfigFrame:Add(enableButton, 1, 12)
local masterChannel = CreateBasicSmallEditBox("HeimdallNoterConfigMasterChannel",
noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.masterChannel,
@@ -1879,6 +1879,22 @@ function shared.Config.Init()
end
end)
noterConfigFrame:Add(masterChannel, 2, 6)
local lastNotes = CreateBasicSmallEditBox("HeimdallNoterConfigLastNotes",
noterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.lastNotes,
tostring(Heimdall_Data.config.noter.lastNotes),
function(self)
local text = self:GetText()
local value = tonumber(text)
if value and value > 0 then
Heimdall_Data.config.noter.lastNotes = value
print("Last notes set to", value)
else
print("Invalid number of last notes", text)
self:SetText(tostring(Heimdall_Data.config.noter.lastNotes))
end
end)
noterConfigFrame:Add(lastNotes, 2, 6)
end
-- Whisper Notify