diff --git a/Titan/TitanConfig.lua b/Titan/TitanConfig.lua index 7b5a3da..60a9fa8 100644 --- a/Titan/TitanConfig.lua +++ b/Titan/TitanConfig.lua @@ -35,11 +35,7 @@ local notes = "" local changes = "" do -- recent change history changes = changes -<<<<<<< HEAD ..TitanUtils_GetGoldText("7.00.03.100007 : 2023/05/07\n") -======= - ..TitanUtils_GetGoldText("7.00.02.100007 : 2023/03/31\n") ->>>>>>> parent of 45b7343 (- Config : Clarify recent changes history) ..TitanUtils_GetGreenText("Titan : \n") ..TitanUtils_GetHighlightText("" .."- Beta Release\n" diff --git a/TitanRepair/TitanRepair.lua b/TitanRepair/TitanRepair.lua index 04db40d..1850d25 100644 --- a/TitanRepair/TitanRepair.lua +++ b/TitanRepair/TitanRepair.lua @@ -389,17 +389,28 @@ local function GetTextGSC(money) local GSC_NONE = "|cffa0a0a0" .. NONE .. "|r"; local g, s, c, neg = GetGSC(money); local gsc = ""; - if (g > 0) then - gsc = format(GSC_START, GSC_GOLD, g); - gsc = gsc .. format(GSC_PART, GSC_SILVER, s); - gsc = gsc .. format(GSC_PART, GSC_COPPER, c); - elseif (s > 0) then - gsc = format(GSC_START, GSC_SILVER, s); - gsc = gsc .. format(GSC_PART, GSC_COPPER, c); - elseif (c > 0) then - gsc = gsc .. format(GSC_START, GSC_COPPER, c); + + if TitanGetVar(TITAN_REPAIR_ID, "ShowCostGoldOnly") then + if (g > 0) then + gsc = format(GSC_START, GSC_GOLD, g); + elseif (s > 0) or (c > 0) then + gsc = format(GSC_START, GSC_GOLD, 0); + else + gsc = GSC_NONE; + end else - gsc = GSC_NONE; + if (g > 0) then + gsc = format(GSC_START, GSC_GOLD, g); + gsc = gsc .. format(GSC_PART, GSC_SILVER, s); + gsc = gsc .. format(GSC_PART, GSC_COPPER, c); + elseif (s > 0) then + gsc = format(GSC_START, GSC_SILVER, s); + gsc = gsc .. format(GSC_PART, GSC_COPPER, c); + elseif (c > 0) then + gsc = gsc .. format(GSC_START, GSC_COPPER, c); + else + gsc = GSC_NONE; + end end if (neg) then gsc = "(" .. gsc .. ")"; end return gsc; @@ -566,7 +577,7 @@ function TitanPanelRepairButton_OnLoad(self) .."- Shift + Left - Click forces a scan.\n" .."- Left - Click now sells ALL gray items - use with CAUTION!\n" .."- Option to auto sell ALL gray items - use with CAUTION!\n" - .."- Rewritten Nov 2022.\n" + .."May 2023 : New option to display cost in gold only.\n" self.registry = { id = TITAN_REPAIR_ID, category = "Built-ins", @@ -607,6 +618,7 @@ function TitanPanelRepairButton_OnLoad(self) DisplayOnRightSide = false, ShowGray = false, SellAllGray = false, + ShowCostGoldOnly = false, } }; end @@ -1050,6 +1062,15 @@ function TitanPanelRightClickMenu_PrepareRepairMenu() TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); info = {}; + info.text = L["REPAIR_LOCALE"]["ShowRepairCost"].." Gold Only" + info.func = function() + TitanToggleVar(TITAN_REPAIR_ID, "ShowCostGoldOnly") + TitanPanelButton_UpdateButton(TITAN_REPAIR_ID); + end + info.checked = TitanGetVar(TITAN_REPAIR_ID, "ShowCostGoldOnly"); + TitanPanelRightClickMenu_AddButton(info, TitanPanelRightClickMenu_GetDropdownLevel()); + + info = {}; info.text = "Show "..ITEM_QUALITY0_DESC.." Total" --L["REPAIR_LOCALE"]["ShowRepairCost"]; info.func = function() TitanToggleVar(TITAN_REPAIR_ID, "ShowGray");