Based on the code used in
Who Framed Watcher Wabbit this should probably work:
lua Code:
-- Keep track of headers and lines we already processed:
local skinnedHeaders, skinnedLines = {}, {}
-- Function to apply changes to headers and lines:
local function UpdateLine(module, block, objectiveKey, text, lineType, useFullHeight, hideDash, colorStyle)
-- Process the header:
local header = block.HeaderText
if header and not skinnedHeaders[header] then
-- Center align the header text:
header:SetJustifyH("CENTER")
-- (You can add more changes here if you like)
-- Add it to the table of headers we already processed:
skinnedHeaders[header] = true
end
-- Process the line itself:
local line = block.lines[objectiveKey]
if line and not skinnedLines[lines] then
-- Center align the line text:
line.Text:SetJustifyH("CENTER")
-- (You can add more changes here if you like)
-- If the line has a dash...
if line.Dash then
-- ...hide the dash:
line.Dash:Hide()
-- ...and prevent it from being shown in the future:
line.Dash.Show = line.Dash.Hide
end
-- Add it to the list of lines we already processed:
skinnedLines[line] = true
end
end
-- Hook the AddObjective method for all modules:
for i = 1, #ObjectiveTrackerFrame.MODULES do
hooksecurefunc(ObjectiveTrackerFrame.MODULES[i], "AddObjective", UpdateLine)
end
hooksecurefunc(SCENARIO_TRACKER_MODULE, "AddObjective", UpdateLine)
Depending on how the lines are sized and anchored (I didn't look) you may need to make additional changes to support center alignment. If it doesn't look properly centered, post a screenshot.