mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 06:00:00 +00:00
bags: only hide chat when option is set
This commit is contained in:
@@ -85,6 +85,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("appearance", "bags", "borderlimit", "1")
|
||||
pfUI:UpdateConfig("appearance", "bags", "borderonlygear", "0")
|
||||
pfUI:UpdateConfig("appearance", "bags", "movable", "0")
|
||||
pfUI:UpdateConfig("appearance", "bags", "hidechat", "0")
|
||||
pfUI:UpdateConfig("appearance", "bags", "icon_size", "-1")
|
||||
pfUI:UpdateConfig("appearance", "bags", "bagrowlength", "10")
|
||||
pfUI:UpdateConfig("appearance", "bags", "bankrowlength", "10")
|
||||
|
||||
+5
-6
@@ -209,8 +209,7 @@ pfUI:RegisterModule("bags", function ()
|
||||
local iterate = {}
|
||||
local anchor, rowlength, cwidth
|
||||
|
||||
local isLeft = (object == "bank")
|
||||
if isLeft then
|
||||
if object == "bank" then
|
||||
if not pfUI.bag.left then pfUI.bag.left = CreateFrame("Frame", "pfBank", UIParent) end
|
||||
anchor = { "BOTTOMLEFT", (pfUI.chat and pfUI.chat.left or nil), "BOTTOMRIGHT" }
|
||||
rowlength = tonumber(C.appearance.bags.bankrowlength)
|
||||
@@ -309,18 +308,18 @@ pfUI:RegisterModule("bags", function ()
|
||||
if pfUI.panel then topspace = topspace + pfUI.panel.right:GetHeight() end
|
||||
frame:SetHeight( default_border*2 + y*(frame.button_size+default_border*3) + topspace)
|
||||
|
||||
local chat = pfUI.chat.right
|
||||
if isLeft then chat = pfUI.chat.left end
|
||||
local chat = pfUI.chat and ( object == "bank" and pfUI.chat.left or pfUI.chat.right) or nil
|
||||
|
||||
frame:SetScript("OnShow", function()
|
||||
if chat and chat:IsVisible() then
|
||||
if C.appearance.bags.hidechat == "1" and chat and chat:IsVisible() then
|
||||
frame.chatWasOpen = true
|
||||
chat:Hide()
|
||||
end
|
||||
pfUI.bag:CreateBags(object)
|
||||
end)
|
||||
|
||||
frame:SetScript("OnHide", function()
|
||||
if chat and frame.chatWasOpen then
|
||||
if C.appearance.bags.hidechat == "1" and chat and frame.chatWasOpen then
|
||||
chat:Show()
|
||||
frame.chatWasOpen = false
|
||||
end
|
||||
|
||||
@@ -926,6 +926,7 @@ pfUI:RegisterModule("gui", function ()
|
||||
CreateConfig(nil, this, T["Disable Item Quality Color For \"Common\" Items"], C.appearance.bags, "borderlimit", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Item Quality Color For Equipment Only"], C.appearance.bags, "borderonlygear", "checkbox")
|
||||
CreateConfig(nil, this, T["Enable Movable Bags"], C.appearance.bags, "movable", "checkbox")
|
||||
CreateConfig(nil, this, T["Hide Chat When Bags Are Opened"], C.appearance.bags, "hidechat", "checkbox")
|
||||
CreateConfig(nil, this, T["Bagslots Per Row"], C.appearance.bags, "bagrowlength")
|
||||
CreateConfig(nil, this, T["Bankslots Per Row"], C.appearance.bags, "bankrowlength")
|
||||
CreateConfig(nil, this, T["Item Slot Size"], C.appearance.bags, "icon_size")
|
||||
|
||||
Reference in New Issue
Block a user