Show Coins option not supported via text string

@Bunny67 Maybe you have an alternative method?
This commit is contained in:
Crum
2018-01-07 23:27:32 -06:00
parent 6576a9418f
commit e6d3dc8959
14 changed files with 17 additions and 44 deletions
+4 -7
View File
@@ -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)
+1 -2
View File
@@ -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()
+7 -8
View File
@@ -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)
+5 -12
View File
@@ -59,33 +59,26 @@ E.Options.args.bags = {
},
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText(); end
},
moneyCoins = {
order = 3,
type = "toggle",
name = L["Show Coins"],
desc = L["Use coin icons instead of colored text."],
set = function(info, value) E.db.bags[ info[getn(info)] ] = value; B:UpdateGoldText(); end
},
clearSearchOnClose = {
order = 4,
order = 3,
type = "toggle",
name = L["Clear Search On Close"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; end
},
disableBagSort = {
order = 5,
order = 4,
type = "toggle",
name = L["Disable Bag Sort"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(false); end
},
disableBankSort = {
order = 6,
order = 5,
type = "toggle",
name = L["Disable Bank Sort"],
set = function(info, value) E.db.bags[info[getn(info)]] = value; B:ToggleSortButtonState(true); end
},
countGroup = {
order = 7,
order = 6,
type = "group",
name = L["Item Count Font"],
guiInline = true,
@@ -135,7 +128,7 @@ E.Options.args.bags = {
}
},
itemLevelGroup = {
order = 8,
order = 7,
type = "group",
name = L["Item Level"],
guiInline = true,
-6
View File
@@ -130,12 +130,6 @@ E.Options.args.datatexts = {
["CONDENSED"] = L["Condensed"],
["BLIZZARD"] = L["Blizzard Style"]
}
},
goldCoins = {
order = 7,
type = "toggle",
name = L["Show Coins"],
desc = L["Use coin icons instead of colored text."]
}
}
},
@@ -176,7 +176,6 @@ L["Search Syntax"] = "搜索语法"
L["Set the size of your bag buttons."] = "设置背包按钮尺寸"
L["Short (Whole Numbers)"] = "短(完整数字)"
L["Short"] = ""
L["Show Coins"] = "显示硬币"
L["Smart"] = "智能"
L["Sort Direction"] = "排列方向"
L["Sort Inverted"] = "倒序"
@@ -174,7 +174,6 @@ L["Search Syntax"] = true;
L["Set the size of your bag buttons."] = true;
L["Short (Whole Numbers)"] = true;
L["Short"] = true;
L["Show Coins"] = true;
L["Smart"] = true;
L["Sort Direction"] = true; --Also used in Buffs and Debuffs
L["Sort Inverted"] = true;
@@ -176,7 +176,6 @@ L["Search Syntax"] = "Syntaxe pour la recherche"
L["Set the size of your bag buttons."] = "Définissez la taille de vos boutons de sac."
L["Short (Whole Numbers)"] = "Court (nombres entiers)"
L["Short"] = "Court"
L["Show Coins"] = "Afficher les pièces"
L["Smart"] = "Intelligent"
L["Sort Direction"] = "Type de direction" --Also used in Buffs and Debuffs
L["Sort Inverted"] = "Tri inversé"
@@ -176,7 +176,6 @@ L["Search Syntax"] = "Suchsyntax"
L["Set the size of your bag buttons."] = "Setze die Größe der Taschen Taste."
L["Short (Whole Numbers)"] = "Kurz (ganze Zahlen)"
L["Short"] = "Kurz"
L["Show Coins"] = "Währungssymbole anzeigen"
L["Smart"] = "Elegant"
L["Sort Direction"] = "Sortierrichtung" --Also used in Buffs and Debuffs
L["Sort Inverted"] = "Umgekehrtes sortieren"
@@ -222,7 +222,6 @@ L["Search Syntax"] = "아이템 검색법"
L["Set the size of your bag buttons."] = "가방바에서 슬롯의 크기를 결정합니다."
L["Short (Whole Numbers)"] = "골드만"
L["Short"] = "짧게"
L["Show Coins"] = "동전 이미지로 보기"
L["Smart"] = "스마트"
L["Sort Direction"] = "정렬 방법"
L["Sort Inverted"] = "아래로 정렬"
@@ -176,7 +176,6 @@ L["Search Syntax"] = true;
L["Set the size of your bag buttons."] = "Define o tamanho dos botões das Bolsas"
L["Short (Whole Numbers)"] = true;
L["Short"] = true;
L["Show Coins"] = true;
L["Smart"] = true;
L["Sort Direction"] = "Direção de organização"
L["Sort Inverted"] = "Oganizar Invertido"
@@ -176,7 +176,6 @@ L["Search Syntax"] = "Синтаксис поиска"
L["Set the size of your bag buttons."] = "Установите размер кнопок на панели."
L["Short (Whole Numbers)"] = "Короткий (целые)"
L["Short"] = "Короткий"
L["Show Coins"] = "Показывать монеты"
L["Smart"] = "Умный"
L["Sort Direction"] = "Направление сортировки" --Also used in Buffs and Debuffs
L["Sort Inverted"] = "Инвертированная сортировка"
@@ -176,7 +176,6 @@ L["Search Syntax"] = true;
L["Set the size of your bag buttons."] = "Establece el tamaño de tus botones de la bolsa."
L["Short (Whole Numbers)"] = true;
L["Short"] = true;
L["Show Coins"] = true;
L["Smart"] = true;
L["Sort Direction"] = "Dirección de Ordenado"
L["Sort Inverted"] = "Ordenado Invertido"
@@ -176,7 +176,6 @@ L["Search Syntax"] = "搜尋語法"
L["Set the size of your bag buttons."] = "設定你的背包格子大小."
L["Short (Whole Numbers)"] = "短 (完整數字)"
L["Short"] = ""
L["Show Coins"] = "顯示硬幣"
L["Smart"] = "智慧"
L["Sort Direction"] = "排序方向"
L["Sort Inverted"] = "倒序排列"