Files
Brues 3612e82fc5 Options: skin ClassicAPI's Settings window
ClassicAPI replaces its Interface Options frame with a port of retail's
Settings window (SettingsPanel). The InterfaceOptionsFrame* names now
alias that window's frames, and the old skin errors on them: the window
has no title region to look up and the list has no fixed rows.

The skin now dresses SettingsPanel: the window, its title bar and close
button, the borders around the category list and the settings, the
Game and AddOns tabs, the search box, and the Close, Apply and Defaults
buttons. Both lists scroll with MinimalScrollBar.

The category rows are pooled and unnamed. A row gets its skin when the
list acquires it, and one rebuild of the list acquires the rows that
exist already. On every state change a row sets its highlight art and
swaps its toggle's plus/minus textures, so the highlight is kept at the
class color and the toggle at pfUI's +/- box, as on the old list.
SkinCollapseButton now accepts an unnamed button for this.

ClassicAPI's own pages are now vertical layouts of retail's setting
controls. The settings rows are pooled too, and each gets its skin when
the list acquires it: the checkbox, the slider and its steppers, the
dropdown and its steppers, ClassicAPI's number box, and the buttons,
key binding keys included. A dropdown's menu takes pfUI's menu style,
because its template names the stock style.

The controls show their tooltips in SettingsTooltip, which joins the
tooltips the Tooltips skin gives pfUI's backdrop.

ClassicAPI v1.20.6 and older have no SettingsPanel. There the skin
still dresses the Interface Options frame and the numbered controls of
ClassicAPI's own pages, as before, so pfUI works on either release.
2026-11-15 01:44:35 -06:00

26 lines
880 B
Lua

pfUI:RegisterSkin("Tooltips", function ()
local rawborder, border = GetBorderSize()
local alpha = tonumber(C.tooltip.alpha)
for _, tooltip in pairs({GameTooltip, ItemRefTooltip, ShoppingTooltip1, ShoppingTooltip2, SettingsTooltip}) do
CreateBackdrop(tooltip, nil, nil, alpha)
CreateBackdropShadow(tooltip)
end
WorldMapTooltip:HookScript("OnShow", function()
CreateBackdrop(WorldMapTooltip, nil, nil, alpha)
CreateBackdropShadow(WorldMapTooltip)
end)
SkinCloseButton(ItemRefCloseButton, ItemRefTooltip.backdrop, -6, -6)
for _, tooltip in pairs({ShoppingTooltip1, ShoppingTooltip2}) do
tooltip:SetClampedToScreen(true)
tooltip:HookScript("OnShow", function()
local a, b, c, x, y = this:GetPoint()
if not x or x == 0 then x = (border*2) + ( x or 0 ) + 1 end
if a then this:SetPoint(a, b, c, x, y) end
end)
end
end)