# HG changeset patch # User Vynn # Date 1480353102 18000 # Node ID ef591210a1e4750b4c786850c69cab42440b6b4f # Parent f9b6c0305908edd00a00dae52aa722574bccdf9c Added configurization and localization options for the economics toggling diff -r f9b6c0305908 -r ef591210a1e4 ProspectMe_Config.lua --- a/ProspectMe_Config.lua Mon Nov 28 12:09:11 2016 -0500 +++ b/ProspectMe_Config.lua Mon Nov 28 12:11:42 2016 -0500 @@ -5,6 +5,7 @@ local UncommonToggle = CreateFrame( "CheckButton", "ProspectMeUncommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) local CommonToggle = CreateFrame( "CheckButton", "ProspectMeCommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) local PoorToggle = CreateFrame( "CheckButton", "ProspectMePoorToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) +local EconToggle = CreateFrame( "CheckButton", "ProspectMeEconToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) local SessionToggle = CreateFrame( "CheckButton", "ProspectMeSessionToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) local PercentToggle = CreateFrame( "CheckButton", "ProspectMePercentToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) local NumberToggle = CreateFrame( "CheckButton", "ProspectMeNumberToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) @@ -22,6 +23,7 @@ SpewMessage(PM_UNCOMMON, PM_UNCOMMONTOOLTIP) SpewMessage(PM_COMMON, PM_COMMONTOOLTIP) SpewMessage(PM_POOR, PM_POORTOOLTIP) + SpewMEssage(PM_ECON, PM_ECONTOOLTIP) SpewMessage(PM_SESSION, PM_SESSIONTOOLTIP) SpewMessage(PM_PERCENT, PM_PERCENTTOOLTIP) SpewMessage(PM_NUMBER, PM_NUMBERTOOLTIP) @@ -43,6 +45,7 @@ ProspectMe.Config.ShowQualities.Uncommon = ProspectMeUncommonToggle:GetChecked() ProspectMe.Config.ShowQualities.Rare = ProspectMeRareToggle:GetChecked() ProspectMe.Config.ShowQualities.Epic = ProspectMeEpicToggle:GetChecked() + ProspectMe.Config.ShowEconomics = ProspectMeEconToggle:GetChecked() ProspectMe.Config.PerSession = ProspectMeSessionToggle:GetChecked() ProspectMe.Config.ShowPercent = ProspectMePercentToggle:GetChecked() ProspectMe.Config.ShowNumber = ProspectMeNumberToggle:GetChecked() @@ -67,6 +70,12 @@ ProspectMeTitle:SetPoint("TOP", 0, -16) ProspectMeTitle:SetText(GetAddOnMetadata("ProspectMe", "Title") .. " v" .. GetAddOnMetadata("ProspectMe", "Version")) + ProspectMeEconToggle:SetPoint( "TOPLEFT", 16, -46 ) + ProspectMeEconToggle:SetScript("OnClick", UpdateConfig) + ProspectMeEconToggle:SetChecked(ProspectMe.Config.ShowEconomics) + ProspectMeEconToggleText:SetText(PM_ECONTOGGLE) + ProspectMeEconToggle.tooltipText = PM_ECONTOOLTIP + ProspectMeSessionToggle:SetPoint( "TOPLEFT", 32, -46 ) ProspectMeSessionToggle:SetScript("OnClick", UpdateConfig) ProspectMeSessionToggle:SetChecked(ProspectMe.Config.PerSession) @@ -137,8 +146,8 @@ function SlashCmdList.PROSPECTME(msg, editbox) if msg == PM_CONFIG then InterfaceOptionsFrame_OpenToCategory(ProspectMeFrame) - elseif msg == PM_RESULTS then - ProspectMeResultsToggle:SetChecked(not ProspectMeResultsToggle:GetChecked()) + elseif msg == PM_ECON then + ProspectMeEconToggle:SetChecked(not ProspectMeEconToggle:GetChecked()) UpdateConfig() elseif msg == PM_EPIC then ProspectMeEpicToggle:SetChecked(not ProspectMeEpicToggle:GetChecked()) diff -r f9b6c0305908 -r ef591210a1e4 localization.lua --- a/localization.lua Mon Nov 28 12:09:11 2016 -0500 +++ b/localization.lua Mon Nov 28 12:11:42 2016 -0500 @@ -26,6 +26,7 @@ PM_PERCENT = "percent" PM_NUMBER = "number" PM_RESET = "reset" +PM_ECON = "econ" -- Options Frame checkbox names PM_EPICTOGGLE = "|c00A335EE[Epic]|r" @@ -36,6 +37,7 @@ PM_SESSIONTOGGLE = "Default to Per-Session Display" PM_PERCENTTOGGLE = "Show Percentage Results" PM_NUMBERTOGGLE = "Show Number Results" +PM_ECONTOGGLE = "Show Economic Summary" -- Tooltips, displayed with the /prospectme help dialog and when mousing over check boxes in the blizzard interface options frame. PM_CONFIGTOOLTIP = "Shows the Prospect Me Configuration Frame." @@ -47,4 +49,5 @@ PM_SESSIONTOOLTIP = "Toggles the default tooltip display between Lifetime and Session Results. Holding Alt will temporarily display the alternative" PM_PERCENTTOOLTIP = "Toggles the display of result percentages" PM_NUMBERTOOLTIP = "Toggles the display of result totals" -PM_RESETTOOLTIP = "Reset the Prospect Me database to an empty state" \ No newline at end of file +PM_RESETTOOLTIP = "Reset the Prospect Me database to an empty state" +PM_ECONTOOLTOP = "Toggles the display of detailed market stats including, cost, return, net profit, and margin" \ No newline at end of file