diff ProspectMe_Config.lua @ 59:ef591210a1e4

Added configurization and localization options for the economics toggling
author Vynn <mischivin@gmail.com>
date Mon, 28 Nov 2016 12:11:42 -0500
parents 78a07841e004
children
line wrap: on
line diff
--- 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())