mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-28 08:54:43 +00:00
Show Coins option not supported via text string
@Bunny67 Maybe you have an alternative method?
This commit is contained in:
@@ -327,14 +327,11 @@ end
|
||||
local COLOR_COPPER = "|cffeda55f"
|
||||
local COLOR_SILVER = "|cffc7c7cf"
|
||||
local COLOR_GOLD = "|cffffd700"
|
||||
local ICON_COPPER = "|TInterface\\MoneyFrame\\UI-CopperIcon:12:12|t"
|
||||
local ICON_SILVER = "|TInterface\\MoneyFrame\\UI-SilverIcon:12:12|t"
|
||||
local ICON_GOLD = "|TInterface\\MoneyFrame\\UI-GoldIcon:12:12|t"
|
||||
|
||||
function E:FormatMoney(amount, style, textonly)
|
||||
local coppername = textonly and L.copperabbrev or ICON_COPPER
|
||||
local silvername = textonly and L.silverabbrev or ICON_SILVER
|
||||
local goldname = textonly and L.goldabbrev or ICON_GOLD
|
||||
function E:FormatMoney(amount, style)
|
||||
local coppername = L.copperabbrev
|
||||
local silvername = L.silverabbrev
|
||||
local goldname = L.goldabbrev
|
||||
|
||||
local value = abs(amount)
|
||||
local gold = floor(value / 10000)
|
||||
|
||||
@@ -691,8 +691,7 @@ function B:OnEvent()
|
||||
end
|
||||
|
||||
function B:UpdateGoldText()
|
||||
self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db["bags"].moneyFormat, not E.db["bags"].moneyCoins))
|
||||
-- self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), "SMART", true))
|
||||
self.BagFrame.goldText:SetText(E:FormatMoney(GetMoney(), E.db["bags"].moneyFormat))
|
||||
end
|
||||
|
||||
function B:GetGraysValue()
|
||||
|
||||
@@ -29,7 +29,7 @@ local function OnEvent(self)
|
||||
Profit = Profit + Change
|
||||
end
|
||||
|
||||
self.text:SetText(E:FormatMoney(NewMoney, E.db.datatexts.goldFormat or "BLIZZARD", not E.db.datatexts.goldCoins))
|
||||
self.text:SetText(E:FormatMoney(NewMoney, E.db.datatexts.goldFormat or "BLIZZARD"))
|
||||
|
||||
ElvDB["gold"][E.myrealm][E.myname] = NewMoney
|
||||
end
|
||||
@@ -46,16 +46,15 @@ end
|
||||
|
||||
local function OnEnter(self)
|
||||
DT:SetupTooltip(self)
|
||||
local textOnly = not E.db.datatexts.goldCoins and true or false
|
||||
local style = E.db.datatexts.goldFormat or "BLIZZARD"
|
||||
|
||||
DT.tooltip:AddLine(L["Session:"])
|
||||
DT.tooltip:AddDoubleLine(L["Earned:"], E:FormatMoney(Profit, style, textOnly), 1, 1, 1, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Spent:"], E:FormatMoney(Spent, style, textOnly), 1, 1, 1, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Earned:"], E:FormatMoney(Profit, style), 1, 1, 1, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Spent:"], E:FormatMoney(Spent, style), 1, 1, 1, 1, 1, 1)
|
||||
if Profit < Spent then
|
||||
DT.tooltip:AddDoubleLine(L["Deficit:"], E:FormatMoney(Profit-Spent, style, textOnly), 1, 0, 0, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Deficit:"], E:FormatMoney(Profit-Spent, style), 1, 0, 0, 1, 1, 1)
|
||||
elseif (Profit - Spent) > 0 then
|
||||
DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit-Spent, style, textOnly), 0, 1, 0, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Profit:"], E:FormatMoney(Profit-Spent, style), 0, 1, 0, 1, 1, 1)
|
||||
end
|
||||
DT.tooltip:AddLine(" ")
|
||||
|
||||
@@ -64,14 +63,14 @@ local function OnEnter(self)
|
||||
|
||||
for k, _ in pairs(ElvDB["gold"][E.myrealm]) do
|
||||
if ElvDB["gold"][E.myrealm][k] then
|
||||
DT.tooltip:AddDoubleLine(k, E:FormatMoney(ElvDB["gold"][E.myrealm][k], style, textOnly), 1, 1, 1, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(k, E:FormatMoney(ElvDB["gold"][E.myrealm][k], style), 1, 1, 1, 1, 1, 1)
|
||||
totalGold = totalGold + ElvDB["gold"][E.myrealm][k]
|
||||
end
|
||||
end
|
||||
|
||||
DT.tooltip:AddLine(" ")
|
||||
DT.tooltip:AddLine(L["Server: "])
|
||||
DT.tooltip:AddDoubleLine(L["Total: "], E:FormatMoney(totalGold, style, textOnly), 1, 1, 1, 1, 1, 1)
|
||||
DT.tooltip:AddDoubleLine(L["Total: "], E:FormatMoney(totalGold, style), 1, 1, 1, 1, 1, 1)
|
||||
|
||||
DT.tooltip:AddLine(" ")
|
||||
DT.tooltip:AddLine(resetInfoFormatter)
|
||||
|
||||
Reference in New Issue
Block a user