feat: track, untrack characters from money, inventory and view
This commit is contained in:
@@ -26,6 +26,11 @@ function DB:Initialize()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Initialize gold blacklist (account-wide)
|
||||||
|
if not Guda_DB.goldBlacklist then
|
||||||
|
Guda_DB.goldBlacklist = {}
|
||||||
|
end
|
||||||
|
|
||||||
-- Initialize character DB
|
-- Initialize character DB
|
||||||
if not Guda_CharDB then
|
if not Guda_CharDB then
|
||||||
Guda_CharDB = {
|
Guda_CharDB = {
|
||||||
@@ -431,6 +436,23 @@ function DB:GetTotalMoney(sameFactionOnly, currentRealmOnly)
|
|||||||
return total
|
return total
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Check if a character is excluded from gold/inventory tracking
|
||||||
|
function DB:IsGoldBlacklisted(fullName)
|
||||||
|
return Guda_DB.goldBlacklist and Guda_DB.goldBlacklist[fullName]
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Toggle a character's exclusion from gold/inventory tracking
|
||||||
|
function DB:ToggleGoldBlacklist(fullName)
|
||||||
|
if not Guda_DB.goldBlacklist then
|
||||||
|
Guda_DB.goldBlacklist = {}
|
||||||
|
end
|
||||||
|
if Guda_DB.goldBlacklist[fullName] then
|
||||||
|
Guda_DB.goldBlacklist[fullName] = nil
|
||||||
|
else
|
||||||
|
Guda_DB.goldBlacklist[fullName] = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Get character setting
|
-- Get character setting
|
||||||
function DB:GetSetting(key)
|
function DB:GetSetting(key)
|
||||||
-- SavedVariables may not be initialized yet when some UI OnLoad scripts run
|
-- SavedVariables may not be initialized yet when some UI OnLoad scripts run
|
||||||
|
|||||||
+2
-2
@@ -279,8 +279,8 @@ function Tooltip:AddInventoryInfo(tooltip, link)
|
|||||||
|
|
||||||
-- Count items across characters on current realm only
|
-- Count items across characters on current realm only
|
||||||
for charName, charData in pairs(Guda_DB.characters) do
|
for charName, charData in pairs(Guda_DB.characters) do
|
||||||
-- Ensure charData is actually a table and on current realm
|
-- Ensure charData is actually a table, on current realm, and not blacklisted
|
||||||
if type(charData) == "table" and charData.realm == currentRealm then
|
if type(charData) == "table" and charData.realm == currentRealm and not addon.Modules.DB:IsGoldBlacklisted(charName) then
|
||||||
local isCurrentChar = (charName == currentPlayerName)
|
local isCurrentChar = (charName == currentPlayerName)
|
||||||
local bagCount, bankCount, equippedCount, mailCount = CountItemsForCharacter(itemID, charData, isCurrentChar)
|
local bagCount, bankCount, equippedCount, mailCount = CountItemsForCharacter(itemID, charData, isCurrentChar)
|
||||||
|
|
||||||
|
|||||||
+164
-25
@@ -2040,10 +2040,10 @@ function BagFrame:EnsureMoneyTooltipOverlay()
|
|||||||
local moneyFrame = getglobal("Guda_BagFrame_MoneyFrame")
|
local moneyFrame = getglobal("Guda_BagFrame_MoneyFrame")
|
||||||
if not moneyFrame then return end
|
if not moneyFrame then return end
|
||||||
|
|
||||||
-- Create transparent overlay frame
|
-- Create transparent overlay frame (high strata to sit above money buttons)
|
||||||
overlay = CreateFrame("Frame", overlayName, moneyFrame)
|
overlay = CreateFrame("Frame", overlayName, moneyFrame)
|
||||||
overlay:SetAllPoints(moneyFrame)
|
overlay:SetAllPoints(moneyFrame)
|
||||||
overlay:SetFrameLevel(moneyFrame:GetFrameLevel() + 1)
|
overlay:SetFrameStrata("DIALOG")
|
||||||
overlay:EnableMouse(true)
|
overlay:EnableMouse(true)
|
||||||
|
|
||||||
-- Set tooltip handlers on overlay
|
-- Set tooltip handlers on overlay
|
||||||
@@ -2073,6 +2073,11 @@ function BagFrame:EnsureMoneyTooltipOverlay()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
overlay:SetScript("OnMouseUp", function()
|
overlay:SetScript("OnMouseUp", function()
|
||||||
|
if arg1 == "RightButton" then
|
||||||
|
Guda_MoneyTooltip_Hide()
|
||||||
|
Guda_ShowGoldTrackingMenu(moneyFrame)
|
||||||
|
return
|
||||||
|
end
|
||||||
local bagFrame = getglobal("Guda_BagFrame")
|
local bagFrame = getglobal("Guda_BagFrame")
|
||||||
local isLocked = addon.Modules.DB and addon.Modules.DB:GetSetting("lockBags")
|
local isLocked = addon.Modules.DB and addon.Modules.DB:GetSetting("lockBags")
|
||||||
|
|
||||||
@@ -2212,6 +2217,11 @@ local function CreateMoneyTooltip()
|
|||||||
f.totalMoney:SetPoint("TOPRIGHT", f, "TOPRIGHT", -10, -10)
|
f.totalMoney:SetPoint("TOPRIGHT", f, "TOPRIGHT", -10, -10)
|
||||||
DisableMoneyFrameAutoUpdate("Guda_MoneyTooltip_Total")
|
DisableMoneyFrameAutoUpdate("Guda_MoneyTooltip_Total")
|
||||||
|
|
||||||
|
-- Hint text at bottom
|
||||||
|
f.hint = f:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||||
|
f.hint:SetText("Right-click to manage characters")
|
||||||
|
f.hint:SetTextColor(0.5, 0.5, 0.5)
|
||||||
|
|
||||||
return f
|
return f
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2237,58 +2247,107 @@ function Guda_MoneyTooltip_Show(anchor)
|
|||||||
-- Hide GameTooltip to avoid overlap
|
-- Hide GameTooltip to avoid overlap
|
||||||
GameTooltip:Hide()
|
GameTooltip:Hide()
|
||||||
|
|
||||||
local chars = addon.Modules.DB:GetAllCharacters(false, true)
|
local allChars = addon.Modules.DB:GetAllCharacters(false, false) -- all realms
|
||||||
local totalMoney = addon.Modules.DB:GetTotalMoney(false, true)
|
local totalMoney = 0
|
||||||
|
|
||||||
|
-- Group non-blacklisted characters by realm
|
||||||
|
local realms = {}
|
||||||
|
local realmOrder = {}
|
||||||
|
for _, char in ipairs(allChars) do
|
||||||
|
if not addon.Modules.DB:IsGoldBlacklisted(char.fullName) then
|
||||||
|
local realm = char.realm or "Unknown"
|
||||||
|
if not realms[realm] then
|
||||||
|
realms[realm] = { chars = {}, money = 0 }
|
||||||
|
table.insert(realmOrder, realm)
|
||||||
|
end
|
||||||
|
table.insert(realms[realm].chars, char)
|
||||||
|
realms[realm].money = realms[realm].money + (char.money or 0)
|
||||||
|
totalMoney = totalMoney + (char.money or 0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(realmOrder)
|
||||||
|
|
||||||
-- Update header money
|
-- Update header money
|
||||||
|
moneyTooltip.header:SetText("Total gold")
|
||||||
MoneyFrame_Update("Guda_MoneyTooltip_Total", totalMoney)
|
MoneyFrame_Update("Guda_MoneyTooltip_Total", totalMoney)
|
||||||
FormatMoneyFrameWithCommas("Guda_MoneyTooltip_Total")
|
FormatMoneyFrameWithCommas("Guda_MoneyTooltip_Total")
|
||||||
|
|
||||||
-- Layout character rows
|
-- Layout rows: realm headers + character rows
|
||||||
local rowHeight = 18
|
local rowHeight = 18
|
||||||
local padding = 10
|
local padding = 10
|
||||||
local yOffset = -10 - 20 - 14 -- top padding + header height + gap before character list
|
local yOffset = -10 - 20 - 14 -- top padding + header height + gap
|
||||||
|
local rowIndex = 0
|
||||||
|
|
||||||
for i, char in ipairs(chars) do
|
for _, realm in ipairs(realmOrder) do
|
||||||
local row = GetOrCreateMoneyRow(i)
|
local realmData = realms[realm]
|
||||||
|
|
||||||
-- Class-colored name
|
-- Realm header row
|
||||||
local classToken = char.classToken
|
rowIndex = rowIndex + 1
|
||||||
local classColor = classToken and (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classToken]
|
local row = GetOrCreateMoneyRow(rowIndex)
|
||||||
local r, g, b = 0.7, 0.7, 0.7
|
row.label:SetTextColor(1, 0.82, 0) -- gold color for realm header
|
||||||
if classColor then r, g, b = classColor.r, classColor.g, classColor.b end
|
row.label:SetText(realm)
|
||||||
|
|
||||||
row.label:SetTextColor(r, g, b)
|
|
||||||
row.label:SetText(char.name)
|
|
||||||
row.label:ClearAllPoints()
|
row.label:ClearAllPoints()
|
||||||
row.label:SetPoint("TOPLEFT", moneyTooltip, "TOPLEFT", padding, yOffset)
|
row.label:SetPoint("TOPLEFT", moneyTooltip, "TOPLEFT", padding, yOffset)
|
||||||
row.label:Show()
|
row.label:Show()
|
||||||
|
|
||||||
local frameName = "Guda_MoneyTooltip_Row" .. i
|
local frameName = "Guda_MoneyTooltip_Row" .. rowIndex
|
||||||
MoneyFrame_Update(frameName, char.money or 0)
|
MoneyFrame_Update(frameName, realmData.money)
|
||||||
FormatMoneyFrameWithCommas(frameName)
|
FormatMoneyFrameWithCommas(frameName)
|
||||||
row.money:ClearAllPoints()
|
row.money:ClearAllPoints()
|
||||||
row.money:SetPoint("TOPRIGHT", moneyTooltip, "TOPRIGHT", -padding, yOffset)
|
row.money:SetPoint("TOPRIGHT", moneyTooltip, "TOPRIGHT", -padding, yOffset)
|
||||||
row.money:Show()
|
row.money:Show()
|
||||||
|
|
||||||
yOffset = yOffset - rowHeight
|
yOffset = yOffset - rowHeight
|
||||||
|
|
||||||
|
-- Character rows (indented)
|
||||||
|
for _, char in ipairs(realmData.chars) do
|
||||||
|
rowIndex = rowIndex + 1
|
||||||
|
row = GetOrCreateMoneyRow(rowIndex)
|
||||||
|
|
||||||
|
local classToken = char.classToken
|
||||||
|
local classColor = classToken and (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classToken]
|
||||||
|
local r, g, b = 0.7, 0.7, 0.7
|
||||||
|
if classColor then r, g, b = classColor.r, classColor.g, classColor.b end
|
||||||
|
|
||||||
|
row.label:SetTextColor(r, g, b)
|
||||||
|
row.label:SetText(" " .. char.name)
|
||||||
|
row.label:ClearAllPoints()
|
||||||
|
row.label:SetPoint("TOPLEFT", moneyTooltip, "TOPLEFT", padding, yOffset)
|
||||||
|
row.label:Show()
|
||||||
|
|
||||||
|
frameName = "Guda_MoneyTooltip_Row" .. rowIndex
|
||||||
|
MoneyFrame_Update(frameName, char.money or 0)
|
||||||
|
FormatMoneyFrameWithCommas(frameName)
|
||||||
|
row.money:ClearAllPoints()
|
||||||
|
row.money:SetPoint("TOPRIGHT", moneyTooltip, "TOPRIGHT", -padding, yOffset)
|
||||||
|
row.money:Show()
|
||||||
|
|
||||||
|
yOffset = yOffset - rowHeight
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Hide unused rows
|
-- Hide unused rows
|
||||||
for i = table.getn(chars) + 1, table.getn(moneyTooltipRows) do
|
for i = rowIndex + 1, table.getn(moneyTooltipRows) do
|
||||||
if moneyTooltipRows[i] then
|
if moneyTooltipRows[i] then
|
||||||
moneyTooltipRows[i].label:Hide()
|
moneyTooltipRows[i].label:Hide()
|
||||||
moneyTooltipRows[i].money:Hide()
|
moneyTooltipRows[i].money:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Position hint
|
||||||
|
local hintHeight = 14
|
||||||
|
local hintGap = 6
|
||||||
|
moneyTooltip.hint:ClearAllPoints()
|
||||||
|
moneyTooltip.hint:SetPoint("TOPLEFT", moneyTooltip, "TOPLEFT", padding, yOffset - hintGap)
|
||||||
|
moneyTooltip.hint:Show()
|
||||||
|
|
||||||
-- Calculate frame size
|
-- Calculate frame size
|
||||||
local numRows = table.getn(chars)
|
local totalHeight = 10 + 20 + 14 + (rowIndex * rowHeight) + hintGap + hintHeight + padding
|
||||||
local totalHeight = 10 + 20 + 14 + (numRows * rowHeight) + padding
|
|
||||||
-- Calculate width: widest name + gap + widest money
|
|
||||||
local maxNameWidth = moneyTooltip.header:GetStringWidth()
|
local maxNameWidth = moneyTooltip.header:GetStringWidth()
|
||||||
|
local hintWidth = moneyTooltip.hint:GetStringWidth()
|
||||||
|
if hintWidth > maxNameWidth then maxNameWidth = hintWidth end
|
||||||
local maxMoneyWidth = moneyTooltip.totalMoney:GetWidth()
|
local maxMoneyWidth = moneyTooltip.totalMoney:GetWidth()
|
||||||
for i = 1, numRows do
|
for i = 1, rowIndex do
|
||||||
local row = moneyTooltipRows[i]
|
local row = moneyTooltipRows[i]
|
||||||
if row and row.label:IsShown() then
|
if row and row.label:IsShown() then
|
||||||
local nw = row.label:GetStringWidth()
|
local nw = row.label:GetStringWidth()
|
||||||
@@ -2315,6 +2374,72 @@ function Guda_MoneyTooltip_Hide()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Gold tracking dropdown menu (grouped by realm)
|
||||||
|
local function Guda_GoldTrackingMenu_Initialize()
|
||||||
|
local characters = addon.Modules.DB:GetAllCharacters(false, false) -- all realms
|
||||||
|
|
||||||
|
-- Group characters by realm
|
||||||
|
local realms = {}
|
||||||
|
local realmOrder = {}
|
||||||
|
for _, char in ipairs(characters) do
|
||||||
|
local realm = char.realm or "Unknown"
|
||||||
|
if not realms[realm] then
|
||||||
|
realms[realm] = {}
|
||||||
|
table.insert(realmOrder, realm)
|
||||||
|
end
|
||||||
|
table.insert(realms[realm], char)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Sort realm names
|
||||||
|
table.sort(realmOrder)
|
||||||
|
|
||||||
|
local level = UIDROPDOWNMENU_MENU_LEVEL or 1
|
||||||
|
|
||||||
|
if level == 1 then
|
||||||
|
for _, realm in ipairs(realmOrder) do
|
||||||
|
local info = {}
|
||||||
|
info.text = realm
|
||||||
|
info.notCheckable = 1
|
||||||
|
info.hasArrow = 1
|
||||||
|
info.value = realm
|
||||||
|
UIDropDownMenu_AddButton(info, 1)
|
||||||
|
end
|
||||||
|
elseif level == 2 then
|
||||||
|
local realm = UIDROPDOWNMENU_MENU_VALUE
|
||||||
|
local chars = realms[realm]
|
||||||
|
if chars then
|
||||||
|
for _, char in ipairs(chars) do
|
||||||
|
local charFullName = char.fullName
|
||||||
|
local classColor = char.classToken and RAID_CLASS_COLORS[char.classToken]
|
||||||
|
local r, g, b = 1, 1, 1
|
||||||
|
if classColor then r, g, b = classColor.r, classColor.g, classColor.b end
|
||||||
|
|
||||||
|
local info = {}
|
||||||
|
info.text = addon.Modules.Utils:ColorText(char.name, r, g, b)
|
||||||
|
info.checked = not addon.Modules.DB:IsGoldBlacklisted(charFullName)
|
||||||
|
info.keepShownOnClick = 1
|
||||||
|
info.func = function()
|
||||||
|
addon.Modules.DB:ToggleGoldBlacklist(charFullName)
|
||||||
|
if moneyTooltip and moneyTooltip:IsShown() and moneyTooltip.anchor then
|
||||||
|
Guda_MoneyTooltip_Show(moneyTooltip.anchor)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
UIDropDownMenu_AddButton(info, 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Guda_ShowGoldTrackingMenu(anchor)
|
||||||
|
local menuFrame = getglobal("Guda_GoldTrackingMenu")
|
||||||
|
if not menuFrame then
|
||||||
|
menuFrame = CreateFrame("Frame", "Guda_GoldTrackingMenu", UIParent, "UIDropDownMenuTemplate")
|
||||||
|
end
|
||||||
|
UIDropDownMenu_Initialize(menuFrame, Guda_GoldTrackingMenu_Initialize, "MENU")
|
||||||
|
ToggleDropDownMenu(1, nil, menuFrame, "cursor", 0, 0)
|
||||||
|
Guda_ScaleDropdownFonts(14)
|
||||||
|
end
|
||||||
|
|
||||||
-- Money tooltip handler (BagFrame entry point)
|
-- Money tooltip handler (BagFrame entry point)
|
||||||
function Guda_BagFrame_MoneyOnEnter(self)
|
function Guda_BagFrame_MoneyOnEnter(self)
|
||||||
Guda_MoneyTooltip_Show(self)
|
Guda_MoneyTooltip_Show(self)
|
||||||
@@ -2328,6 +2453,9 @@ local function Guda_BagCharacterMenu_Initialize()
|
|||||||
local currentViewChar = addon.Modules.BagFrame:GetCurrentViewChar()
|
local currentViewChar = addon.Modules.BagFrame:GetCurrentViewChar()
|
||||||
|
|
||||||
for i, char in ipairs(characters) do
|
for i, char in ipairs(characters) do
|
||||||
|
if addon.Modules.DB:IsGoldBlacklisted(char.fullName) and char.fullName ~= currentPlayerFullName then
|
||||||
|
-- skip blacklisted characters (never hide current player)
|
||||||
|
else
|
||||||
local charFullName = char.fullName
|
local charFullName = char.fullName
|
||||||
local charClassToken = char.classToken
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
@@ -2352,6 +2480,7 @@ local function Guda_BagCharacterMenu_Initialize()
|
|||||||
end
|
end
|
||||||
info.checked = (currentViewChar == charFullName or (not currentViewChar and charFullName == currentPlayerFullName))
|
info.checked = (currentViewChar == charFullName or (not currentViewChar and charFullName == currentPlayerFullName))
|
||||||
UIDropDownMenu_AddButton(info)
|
UIDropDownMenu_AddButton(info)
|
||||||
|
end -- else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2370,8 +2499,12 @@ end
|
|||||||
local function Guda_BagMailboxMenu_Initialize()
|
local function Guda_BagMailboxMenu_Initialize()
|
||||||
local characters = addon.Modules.DB:GetAllCharacters(false, true)
|
local characters = addon.Modules.DB:GetAllCharacters(false, true)
|
||||||
local info
|
local info
|
||||||
|
local currentPlayerFullName = addon.Modules.DB:GetPlayerFullName()
|
||||||
|
|
||||||
for i, char in ipairs(characters) do
|
for i, char in ipairs(characters) do
|
||||||
|
if addon.Modules.DB:IsGoldBlacklisted(char.fullName) and char.fullName ~= currentPlayerFullName then
|
||||||
|
-- skip blacklisted characters (never hide current player)
|
||||||
|
else
|
||||||
local charFullName = char.fullName
|
local charFullName = char.fullName
|
||||||
local charClassToken = char.classToken
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
@@ -2394,8 +2527,9 @@ local function Guda_BagMailboxMenu_Initialize()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
local mailboxViewChar = addon.Modules.MailboxFrame:GetCurrentViewChar()
|
local mailboxViewChar = addon.Modules.MailboxFrame:GetCurrentViewChar()
|
||||||
info.checked = (mailboxViewChar == charFullName or (not mailboxViewChar and charFullName == addon.Modules.DB:GetPlayerFullName()))
|
info.checked = (mailboxViewChar == charFullName or (not mailboxViewChar and charFullName == currentPlayerFullName))
|
||||||
UIDropDownMenu_AddButton(info)
|
UIDropDownMenu_AddButton(info)
|
||||||
|
end -- else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2414,8 +2548,12 @@ end
|
|||||||
local function Guda_BagBankMenu_Initialize()
|
local function Guda_BagBankMenu_Initialize()
|
||||||
local characters = addon.Modules.DB:GetAllCharacters(false, true)
|
local characters = addon.Modules.DB:GetAllCharacters(false, true)
|
||||||
local info
|
local info
|
||||||
|
local currentPlayerFullName = addon.Modules.DB:GetPlayerFullName()
|
||||||
|
|
||||||
for i, char in ipairs(characters) do
|
for i, char in ipairs(characters) do
|
||||||
|
if addon.Modules.DB:IsGoldBlacklisted(char.fullName) and char.fullName ~= currentPlayerFullName then
|
||||||
|
-- skip blacklisted characters (never hide current player)
|
||||||
|
else
|
||||||
local charFullName = char.fullName
|
local charFullName = char.fullName
|
||||||
local charClassToken = char.classToken
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
@@ -2436,8 +2574,9 @@ local function Guda_BagBankMenu_Initialize()
|
|||||||
Guda_BagFrame_ShowCharacterBank(charFullName, charName)
|
Guda_BagFrame_ShowCharacterBank(charFullName, charName)
|
||||||
end
|
end
|
||||||
local bankViewChar = addon.Modules.BankFrame:GetCurrentViewChar()
|
local bankViewChar = addon.Modules.BankFrame:GetCurrentViewChar()
|
||||||
info.checked = (bankViewChar == charFullName or (not bankViewChar and charFullName == addon.Modules.DB:GetPlayerFullName()))
|
info.checked = (bankViewChar == charFullName or (not bankViewChar and charFullName == currentPlayerFullName))
|
||||||
UIDropDownMenu_AddButton(info)
|
UIDropDownMenu_AddButton(info)
|
||||||
|
end -- else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+13
-2
@@ -1549,10 +1549,10 @@ function BankFrame:EnsureMoneyTooltipOverlay()
|
|||||||
local moneyFrame = getglobal("Guda_BankFrame_MoneyFrame")
|
local moneyFrame = getglobal("Guda_BankFrame_MoneyFrame")
|
||||||
if not moneyFrame then return end
|
if not moneyFrame then return end
|
||||||
|
|
||||||
-- Create transparent overlay frame
|
-- Create transparent overlay frame (high strata to sit above money buttons)
|
||||||
overlay = CreateFrame("Frame", overlayName, moneyFrame)
|
overlay = CreateFrame("Frame", overlayName, moneyFrame)
|
||||||
overlay:SetAllPoints(moneyFrame)
|
overlay:SetAllPoints(moneyFrame)
|
||||||
overlay:SetFrameLevel(moneyFrame:GetFrameLevel() + 1)
|
overlay:SetFrameStrata("DIALOG")
|
||||||
overlay:EnableMouse(true)
|
overlay:EnableMouse(true)
|
||||||
|
|
||||||
-- Set tooltip handlers on overlay
|
-- Set tooltip handlers on overlay
|
||||||
@@ -1564,6 +1564,13 @@ function BankFrame:EnsureMoneyTooltipOverlay()
|
|||||||
GameTooltip:Hide()
|
GameTooltip:Hide()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
overlay:SetScript("OnMouseUp", function()
|
||||||
|
if arg1 == "RightButton" then
|
||||||
|
Guda_MoneyTooltip_Hide()
|
||||||
|
Guda_ShowGoldTrackingMenu(moneyFrame)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
addon:Debug("Bank money tooltip overlay created")
|
addon:Debug("Bank money tooltip overlay created")
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2793,6 +2800,9 @@ local function Guda_BankCharacterMenu_Initialize()
|
|||||||
local currentViewChar = addon.Modules.BankFrame:GetCurrentViewChar()
|
local currentViewChar = addon.Modules.BankFrame:GetCurrentViewChar()
|
||||||
|
|
||||||
for i, char in ipairs(characters) do
|
for i, char in ipairs(characters) do
|
||||||
|
if addon.Modules.DB:IsGoldBlacklisted(char.fullName) and char.fullName ~= currentPlayerFullName then
|
||||||
|
-- skip blacklisted characters (never hide current player)
|
||||||
|
else
|
||||||
local charFullName = char.fullName
|
local charFullName = char.fullName
|
||||||
local charClassToken = char.classToken
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
@@ -2817,6 +2827,7 @@ local function Guda_BankCharacterMenu_Initialize()
|
|||||||
end
|
end
|
||||||
info.checked = (currentViewChar == charFullName or (not currentViewChar and charFullName == currentPlayerFullName))
|
info.checked = (currentViewChar == charFullName or (not currentViewChar and charFullName == currentPlayerFullName))
|
||||||
UIDropDownMenu_AddButton(info)
|
UIDropDownMenu_AddButton(info)
|
||||||
|
end -- else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+6
-1
@@ -357,8 +357,12 @@ end
|
|||||||
local function Guda_MailboxCharacterMenu_Initialize()
|
local function Guda_MailboxCharacterMenu_Initialize()
|
||||||
local characters = addon.Modules.DB:GetAllCharacters(true, true)
|
local characters = addon.Modules.DB:GetAllCharacters(true, true)
|
||||||
local info
|
local info
|
||||||
|
local currentPlayerFullName = addon.Modules.DB:GetPlayerFullName()
|
||||||
|
|
||||||
for i, char in ipairs(characters) do
|
for i, char in ipairs(characters) do
|
||||||
|
if addon.Modules.DB:IsGoldBlacklisted(char.fullName) and char.fullName ~= currentPlayerFullName then
|
||||||
|
-- skip blacklisted characters (never hide current player)
|
||||||
|
else
|
||||||
local charFullName = char.fullName
|
local charFullName = char.fullName
|
||||||
local charClassToken = char.classToken
|
local charClassToken = char.classToken
|
||||||
|
|
||||||
@@ -375,8 +379,9 @@ local function Guda_MailboxCharacterMenu_Initialize()
|
|||||||
info = {}
|
info = {}
|
||||||
info.text = coloredName
|
info.text = coloredName
|
||||||
info.func = function() MailboxFrame:ShowCharacter(charFullName) end
|
info.func = function() MailboxFrame:ShowCharacter(charFullName) end
|
||||||
info.checked = (currentViewChar == char.fullName or (not currentViewChar and char.fullName == addon.Modules.DB:GetPlayerFullName()))
|
info.checked = (currentViewChar == char.fullName or (not currentViewChar and char.fullName == currentPlayerFullName))
|
||||||
UIDropDownMenu_AddButton(info)
|
UIDropDownMenu_AddButton(info)
|
||||||
|
end -- else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user