mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-23 20:40:50 +00:00
* Only move the center panel when it overlaps the left panel The panel aligner cached the left panel's rightmost child once and then re-anchored the center panel to that edge on every change. Children that were hidden later (such as Spellbook skill-line tabs) kept pushing the center panel right, and panels that already cleared the left panel were pulled back to the left. Recalculate the rightmost visible child while both panels are shown and only shift the center panel when its backdrop really overlaps. * Align Quest Log, Friends and Spellbook panel heights Most skinned panels draw their backdrop 430px tall, 10px below the frame top (insets 10/-10 and -30/72). Three panels did not match: - Quest Log: frame was 440px and anchored at y -104, so it stood 10px taller than a panel opened beside it. It is now 430px at y -114, with the list/detail panes and visible rows (22) reduced to fit. - Friends: bottom inset was 74 instead of 72. - Spellbook: top-left inset was 12/-12 instead of 10/-10. The Quest Log is a doublewide UI panel. Opening another panel next to it made UpdateUIPanelPositions re-anchor it to the default (0, -104), causing a visible jump. Its UIPanelWindows entry now carries the same x/y offsets as the OnShow anchor. * Let the panel manager place UI panels Remove the OnUpdate panel aligner. UpdateUIPanelPositions already lays out left/center/right panels, and with the overlap-only rule the aligner no longer changed the spacing in normal cases. The Quest Log's UIPanelWindows offsets put it at 10, -114 on every layout pass, so the QuestLog_OnShow re-anchor is redundant. --------- Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
48 lines
1.6 KiB
Lua
48 lines
1.6 KiB
Lua
pfUI:RegisterModule("skin", function ()
|
|
-- durability frame
|
|
pfUI.durability = CreateFrame("Frame", "pfDurability", UIParent)
|
|
if pfUI.minimap then
|
|
pfUI.durability:SetPoint("TOPLEFT", pfUI.minimap, "BOTTOMLEFT", 0, -35)
|
|
else
|
|
pfUI.durability:SetPoint("LEFT", UIParent, "RIGHT", -120, 120)
|
|
end
|
|
UpdateMovable(pfUI.durability)
|
|
pfUI.durability:SetWidth(80)
|
|
pfUI.durability:SetHeight(70)
|
|
pfUI.durability:SetFrameStrata("BACKGROUND")
|
|
DurabilityFrame:SetParent(pfUI.durability)
|
|
DurabilityFrame:SetAllPoints(pfUI.durability)
|
|
DurabilityFrame:SetFrameLevel(1)
|
|
DurabilityFrame.SetPoint = function() return end
|
|
|
|
if C.appearance.cd.blizzard == "1" then
|
|
hooksecurefunc("PaperDollItemSlotButton_Update", function()
|
|
local cooldown = _G[this:GetName().."Cooldown"]
|
|
if cooldown then cooldown.pfCooldownType = "BLIZZARD" end
|
|
end)
|
|
|
|
hooksecurefunc("SpellButton_UpdateButton", function()
|
|
local cooldown = _G[this:GetName().."Cooldown"]
|
|
if cooldown then cooldown.pfCooldownType = "BLIZZARD" end
|
|
end)
|
|
end
|
|
|
|
for i = 1, UIDROPDOWNMENU_MAXLEVELS do
|
|
CreateBackdrop(_G["DropDownList"..i.."MenuBackdrop"], nil, true, .8)
|
|
CreateBackdropShadow(_G["DropDownList"..i.."MenuBackdrop"])
|
|
|
|
CreateBackdrop(_G["DropDownList"..i.."Backdrop"], nil, true, .8)
|
|
CreateBackdropShadow(_G["DropDownList"..i.."Backdrop"])
|
|
end
|
|
|
|
if C.global.errors_limit == "1" then
|
|
UIErrorsFrame:SetHeight(25)
|
|
end
|
|
|
|
if C.global.errors_hide == "1" then
|
|
UIErrorsFrame:UnregisterEvent("UI_ERROR_MESSAGE")
|
|
else
|
|
UIErrorsFrame:RegisterEvent("UI_ERROR_MESSAGE")
|
|
end
|
|
end)
|