Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Chattynator.toc
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,5 @@ CustomiseDialog/Initialize.lua
CustomiseDialog/Main.lua
CustomiseDialog/Filtering.lua
CustomiseDialog/Components.lua

Core/FinalRefresh.lua
5 changes: 4 additions & 1 deletion Core/Config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ local settings = {
APPLIED_MESSAGE_IDS = {key = "applied_message_ids", default = false, transfer = true},
APPLIED_PLAYER_TABLE = {key = "applied_player_table_5", default = false, transfer = true},

CHAT_COLORS = {key = "chat_colors", default = {}, refresh = {addonTable.Constants.RefreshReason.MessageColor}}
CHAT_COLORS = {key = "chat_colors", default = {}, refresh = {addonTable.Constants.RefreshReason.MessageColor}},

TABSIZE_PADDING = {key = "tabsize_padding", default = 30},
TABSIZE_SPACING = {key = "tabsize_spacing", default = 10}
}

addonTable.Config.RefreshType = {}
Expand Down
11 changes: 11 additions & 0 deletions Core/FinalRefresh.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---@class addonTableChattynator
local addonTable = select(2, ...)

EventFrame_FinalRefresh = CreateFrame("Frame")
EventFrame_FinalRefresh:RegisterEvent("ADDON_LOADED")
EventFrame_FinalRefresh:SetScript("OnEvent", function(self, event)
addonTable.Constants.TabPadding = addonTable.Config.Get(addonTable.Config.Options.TABSIZE_PADDING)
addonTable.Constants.TabSpacing = addonTable.Config.Get(addonTable.Config.Options.TABSIZE_SPACING)
addonTable.CallbackRegistry:TriggerEvent("RefreshStateChange", {[addonTable.Constants.RefreshReason.Tabs] = true})
EventFrame_FinalRefresh:UnregisterEvent("ADDON_LOADED")
end)
20 changes: 20 additions & 0 deletions CustomiseDialog/Main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,26 @@ local function SetupDisplay(parent)
end
table.insert(allFrames, flashOnDropdown)

local tabsettingspadding
tabsettingspadding = addonTable.CustomiseDialog.Components.GetSlider(container, addonTable.Locales.TABSIZE_PADDING, 5, 30, "%s", function()
addonTable.Config.Set(addonTable.Config.Options.TABSIZE_PADDING, tabsettingspadding:GetValue())
addonTable.Constants.TabPadding = tabsettingspadding:GetValue()
addonTable.CallbackRegistry:TriggerEvent("RefreshStateChange", {[addonTable.Constants.RefreshReason.Tabs] = true})
end)
tabsettingspadding.option = addonTable.Config.Options.TABSIZE_PADDING
tabsettingspadding:SetPoint("TOP", allFrames[#allFrames], "BOTTOM")
table.insert(allFrames, tabsettingspadding)

local tabsettingsspacing
tabsettingsspacing = addonTable.CustomiseDialog.Components.GetSlider(container, addonTable.Locales.TABSIZE_SPACING, 1, 20, "%s", function()
addonTable.Config.Set(addonTable.Config.Options.TABSIZE_SPACING, tabsettingsspacing:GetValue())
addonTable.Constants.TabSpacing = tabsettingsspacing:GetValue()
addonTable.CallbackRegistry:TriggerEvent("RefreshStateChange", {[addonTable.Constants.RefreshReason.Tabs] = true})
end)
tabsettingsspacing.option = addonTable.Config.Options.TABSIZE_SPACING
tabsettingsspacing:SetPoint("TOP", allFrames[#allFrames], "BOTTOM")
table.insert(allFrames, tabsettingsspacing)

container:SetScript("OnShow", function()
local LibSharedMedia = LibStub and LibStub:GetLibrary("LibSharedMedia-3.0", true)
local fontValues, fontLabels = {}, {}
Expand Down
3 changes: 3 additions & 0 deletions Locales.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ L["SLASH_RESET_HELP"] = "Reset all Chattynator settings, then reload."
L["SLASH_HELP"] = "Open the Chattynator settings."
L["SLASH_UNKNOWN_COMMAND"] = "Unknown command '%s'"

L["TABSIZE_PADDING"] = "Tab Padding"
L["TABSIZE_SPACING"] = "Tab Spacing"

local L = Locales.frFR
--@localization(locale="frFR", format="lua_additive_table")@

Expand Down