feat(options): name the page scroll bars for skins

Each options page's MinimalScrollBar is now ClassicAPIOptionsScrollBarN,
numbered like the ClassicAPIOptionsControlN controls, so a skin can find
the scroll bars the same way it finds the controls.
This commit is contained in:
Brues
2026-11-03 00:54:42 -06:00
parent e7ecae56da
commit 04790cb6c1
@@ -74,13 +74,20 @@ local rememberSetting = {
local LABEL_X = 48
local CONTROL_X = 200
-- pfUI's Interface Options skin finds the controls by these names.
-- pfUI's Interface Options skin finds the controls and the page scroll bars
-- by these names.
local numControls = 0
local function NextName()
numControls = numControls + 1
return "ClassicAPIOptionsControl" .. numControls
end
local numScrollBars = 0
local function NextScrollBarName()
numScrollBars = numScrollBars + 1
return "ClassicAPIOptionsScrollBar" .. numScrollBars
end
local function RefreshControls(page)
page.updating = true
for _, control in ipairs(page.controls) do
@@ -116,7 +123,7 @@ local function NewPage(name, parent, title, subtitle)
scrollBox:SetPoint("TOPLEFT", page, "TOPLEFT", 0, top)
scrollBox:SetPoint("BOTTOMRIGHT", page, "BOTTOMRIGHT", -20, 8)
scrollBox:EnableMouseWheel(true)
local scrollBar = CreateFrame("EventFrame", nil, page, "MinimalScrollBar")
local scrollBar = CreateFrame("EventFrame", NextScrollBarName(), page, "MinimalScrollBar")
scrollBar:SetPoint("TOPLEFT", scrollBox, "TOPRIGHT", 4, 0)
scrollBar:SetPoint("BOTTOMLEFT", scrollBox, "BOTTOMRIGHT", 4, 0)