From 94268b116233fca184e9f178cf9d94355ad7ba09 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 6 Aug 2026 20:28:32 -0500 Subject: [PATCH] Add option to always show equipment slot flyouts The per-slot popout arrows previously appeared only while the equipment manager sidecar was open. Add a "Always Show Equipment Slot Flyouts" option under Character -> Inventory (character.inventory.equipflyout, off by default) that instead ties them to the paperdoll, so gear can be swapped without opening the equipment manager. Centralize the show/hide in a single UpdatePopouts(): by default the arrows follow the sidecar, with the option on they follow PaperDollFrame. Both the sidecar OnShow/OnHide and new PaperDollFrame OnShow/OnHide hooks route through it, and the flyout hides whenever the arrows go inactive. --- api/config.lua | 1 + modules/equipmentmanager.lua | 34 ++++++++++++++++++++++++++++------ modules/gui.lua | 1 + 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/api/config.lua b/api/config.lua index 08ac65ff..58a7b65b 100644 --- a/api/config.lua +++ b/api/config.lua @@ -956,6 +956,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("questlog", nil, "showQuestLevels", "0") pfUI:UpdateConfig("character", "inventory", "durability", "1") + pfUI:UpdateConfig("character", "inventory", "equipflyout", "0") pfUI:UpdateConfig("character", "reputation", "repRequired", "1") pfUI:UpdateConfig("thirdparty", nil, "chatbg", "1") pfUI:UpdateConfig("thirdparty", nil, "showmeter", "0") diff --git a/modules/equipmentmanager.lua b/modules/equipmentmanager.lua index 6afbc5a1..45615732 100644 --- a/modules/equipmentmanager.lua +++ b/modules/equipmentmanager.lua @@ -13,6 +13,7 @@ pfUI:RegisterModule("equipmentmanager", function() local pendingAction = nil -- "new" | "save" | "rename" — what the popups apply to local slotOverlays = {} -- [invSlotID] = ignored-overlay texture on the character slot local popoutButtons = {} -- popout arrow buttons; toggled with the EM frame + local UpdatePopouts -- forward decl; assigned once popouts + flyout exist -- Pending ignored-slot toggles per set: a slotID here means the -- effective state is flipped from what's persisted. Committed on @@ -76,7 +77,7 @@ pfUI:RegisterModule("equipmentmanager", function() else frame:SetPoint("TOPLEFT", CharacterFrame, "TOPRIGHT", 0, 0) end - for _, b in ipairs(popoutButtons) do b:Show() end + UpdatePopouts() end) CreateBackdrop(frame, nil, nil, .9) CreateBackdropShadow(frame) @@ -452,13 +453,13 @@ pfUI:RegisterModule("equipmentmanager", function() -- ============================================================ local flyout = CreateFrame("Frame", "pfEqMgrFlyout", UIParent) - -- Everything tied to the EM sidecar closes with it: the popout arrows, - -- the per-slot flyout, and the name/icon popup. (OnShow re-shows the - -- popout arrows.) + -- The name/icon popup is sidecar-only, so it closes with the sidecar. + -- Popout arrows and the flyout are reconciled by UpdatePopouts: by + -- default they follow the sidecar, but with the "Always Show Equipment + -- Slot Flyouts" option they stay while the paperdoll is open. frame:SetScript("OnHide", function() - for _, b in ipairs(popoutButtons) do b:Hide() end - flyout:Hide() namePopup:Hide() + UpdatePopouts() end) flyout:SetFrameStrata("DIALOG") flyout:Hide() @@ -750,6 +751,27 @@ pfUI:RegisterModule("equipmentmanager", function() end end + -- Popout arrows follow the EM sidecar by default. With the + -- "Always Show Equipment Slot Flyouts" option they follow the paperdoll + -- instead, so gear can be swapped without opening the equipment manager. + local function PopoutsActive() + if C.character.inventory.equipflyout == "1" then + return PaperDollFrame:IsShown() + end + return frame:IsShown() + end + + function UpdatePopouts() + local show = PopoutsActive() + for _, b in ipairs(popoutButtons) do + if show then b:Show() else b:Hide() end + end + if not show then flyout:Hide() end + end + + PaperDollFrame:HookScript("OnShow", UpdatePopouts) + PaperDollFrame:HookScript("OnHide", UpdatePopouts) + -- ============================================================ -- Refresh -- ============================================================ diff --git a/modules/gui.lua b/modules/gui.lua index 0db3bb94..dd02a599 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2412,6 +2412,7 @@ pfUI:RegisterModule("gui", function () CreateGUIEntry(T["Character"], T["Inventory"], function() CreateConfig(nil, T["Show Durability"], C.character.inventory, "durability", "checkbox") + CreateConfig(nil, T["Always Show Equipment Slot Flyouts"], C.character.inventory, "equipflyout", "checkbox") end) CreateGUIEntry(T["Character"], T["Reputation"], function()