From e6d3dc8959ecec6ee050cf2e1fe38979294f523a Mon Sep 17 00:00:00 2001 From: Crum Date: Sun, 7 Jan 2018 23:27:32 -0600 Subject: [PATCH] Show Coins option not supported via text string @Bunny67 Maybe you have an alternative method? --- 2/3/4/5/6/7/ElvUI/Core/Math.lua | 11 ++++------- 2/3/4/5/6/7/ElvUI/Modules/Bags/Bags.lua | 3 +-- 2/3/4/5/6/7/ElvUI/Modules/DataTexts/Gold.lua | 15 +++++++-------- 2/3/4/5/6/7/ElvUI_Config/Bags.lua | 17 +++++------------ 2/3/4/5/6/7/ElvUI_Config/DataTexts.lua | 6 ------ .../6/7/ElvUI_Config/Locales/Chinese_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/English_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/French_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/German_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/Korean_Config.lua | 1 - .../ElvUI_Config/Locales/Portuguese_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/Russian_Config.lua | 1 - .../6/7/ElvUI_Config/Locales/Spanish_Config.lua | 1 - .../7/ElvUI_Config/Locales/Taiwanese_Config.lua | 1 - 14 files changed, 17 insertions(+), 44 deletions(-) diff --git a/2/3/4/5/6/7/ElvUI/Core/Math.lua b/2/3/4/5/6/7/ElvUI/Core/Math.lua index 2c12aef..43512a2 100644 --- a/2/3/4/5/6/7/ElvUI/Core/Math.lua +++ b/2/3/4/5/6/7/ElvUI/Core/Math.lua @@ -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) diff --git a/2/3/4/5/6/7/ElvUI/Modules/Bags/Bags.lua b/2/3/4/5/6/7/ElvUI/Modules/Bags/Bags.lua index 0203e48..e4845a3 100644 --- a/2/3/4/5/6/7/ElvUI/Modules/Bags/Bags.lua +++ b/2/3/4/5/6/7/ElvUI/Modules/Bags/Bags.lua @@ -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() diff --git a/2/3/4/5/6/7/ElvUI/Modules/DataTexts/Gold.lua b/2/3/4/5/6/7/ElvUI/Modules/DataTexts/Gold.lua index 1854ca8..7ca9ea4 100644 --- a/2/3/4/5/6/7/ElvUI/Modules/DataTexts/Gold.lua +++ b/2/3/4/5/6/7/ElvUI/Modules/DataTexts/Gold.lua @@ -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) diff --git a/2/3/4/5/6/7/ElvUI_Config/Bags.lua b/2/3/4/5/6/7/ElvUI_Config/Bags.lua index b027def..fda789a 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Bags.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Bags.lua @@ -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, diff --git a/2/3/4/5/6/7/ElvUI_Config/DataTexts.lua b/2/3/4/5/6/7/ElvUI_Config/DataTexts.lua index 0ffed57..1f02076 100644 --- a/2/3/4/5/6/7/ElvUI_Config/DataTexts.lua +++ b/2/3/4/5/6/7/ElvUI_Config/DataTexts.lua @@ -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."] } } }, diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Chinese_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Chinese_Config.lua index 736a723..2dbc324 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Chinese_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Chinese_Config.lua @@ -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"] = "倒序" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/English_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/English_Config.lua index 99da54f..00ef524 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/English_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/English_Config.lua @@ -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; diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/French_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/French_Config.lua index e73e30b..7d5b8e2 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/French_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/French_Config.lua @@ -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é" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/German_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/German_Config.lua index fbdb676..ec63f2c 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/German_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/German_Config.lua @@ -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" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Korean_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Korean_Config.lua index 8e57de5..a77217a 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Korean_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Korean_Config.lua @@ -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"] = "아래로 정렬" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Portuguese_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Portuguese_Config.lua index 7f06cf6..1edac93 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Portuguese_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Portuguese_Config.lua @@ -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" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Russian_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Russian_Config.lua index c09cbba..efe7698 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Russian_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Russian_Config.lua @@ -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"] = "Инвертированная сортировка" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Spanish_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Spanish_Config.lua index bcbe683..74a8f5d 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Spanish_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Spanish_Config.lua @@ -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" diff --git a/2/3/4/5/6/7/ElvUI_Config/Locales/Taiwanese_Config.lua b/2/3/4/5/6/7/ElvUI_Config/Locales/Taiwanese_Config.lua index 6ef3231..378f878 100644 --- a/2/3/4/5/6/7/ElvUI_Config/Locales/Taiwanese_Config.lua +++ b/2/3/4/5/6/7/ElvUI_Config/Locales/Taiwanese_Config.lua @@ -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"] = "倒序排列"