Mercurial > wow > prospect-me
comparison 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 |
comparison
equal
deleted
inserted
replaced
58:f9b6c0305908 | 59:ef591210a1e4 |
---|---|
3 local EpicToggle = CreateFrame( "CheckButton", "ProspectMeEpicToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 3 local EpicToggle = CreateFrame( "CheckButton", "ProspectMeEpicToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
4 local RareToggle = CreateFrame( "CheckButton", "ProspectMeRareToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 4 local RareToggle = CreateFrame( "CheckButton", "ProspectMeRareToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
5 local UncommonToggle = CreateFrame( "CheckButton", "ProspectMeUncommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 5 local UncommonToggle = CreateFrame( "CheckButton", "ProspectMeUncommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
6 local CommonToggle = CreateFrame( "CheckButton", "ProspectMeCommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 6 local CommonToggle = CreateFrame( "CheckButton", "ProspectMeCommonToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
7 local PoorToggle = CreateFrame( "CheckButton", "ProspectMePoorToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 7 local PoorToggle = CreateFrame( "CheckButton", "ProspectMePoorToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
8 local EconToggle = CreateFrame( "CheckButton", "ProspectMeEconToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | |
8 local SessionToggle = CreateFrame( "CheckButton", "ProspectMeSessionToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 9 local SessionToggle = CreateFrame( "CheckButton", "ProspectMeSessionToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
9 local PercentToggle = CreateFrame( "CheckButton", "ProspectMePercentToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 10 local PercentToggle = CreateFrame( "CheckButton", "ProspectMePercentToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
10 local NumberToggle = CreateFrame( "CheckButton", "ProspectMeNumberToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) | 11 local NumberToggle = CreateFrame( "CheckButton", "ProspectMeNumberToggle", ProspectMeFrame, "InterfaceOptionsCheckButtonTemplate" ) |
11 local ResetResults = CreateFrame( "Button", "ProspectMeResetButton", ProspectMeFrame, "UIPanelButtonTemplate" ) | 12 local ResetResults = CreateFrame( "Button", "ProspectMeResetButton", ProspectMeFrame, "UIPanelButtonTemplate" ) |
12 local ResetText = PM_ConfigFrame:CreateFontString( "ProspectMeResetText", nil, "GameFontNormal" ) | 13 local ResetText = PM_ConfigFrame:CreateFontString( "ProspectMeResetText", nil, "GameFontNormal" ) |
20 SpewMessage(PM_EPIC, PM_EPICTOOLTIP) | 21 SpewMessage(PM_EPIC, PM_EPICTOOLTIP) |
21 SpewMessage(PM_RARE, PM_RARETOOLTIP) | 22 SpewMessage(PM_RARE, PM_RARETOOLTIP) |
22 SpewMessage(PM_UNCOMMON, PM_UNCOMMONTOOLTIP) | 23 SpewMessage(PM_UNCOMMON, PM_UNCOMMONTOOLTIP) |
23 SpewMessage(PM_COMMON, PM_COMMONTOOLTIP) | 24 SpewMessage(PM_COMMON, PM_COMMONTOOLTIP) |
24 SpewMessage(PM_POOR, PM_POORTOOLTIP) | 25 SpewMessage(PM_POOR, PM_POORTOOLTIP) |
26 SpewMEssage(PM_ECON, PM_ECONTOOLTIP) | |
25 SpewMessage(PM_SESSION, PM_SESSIONTOOLTIP) | 27 SpewMessage(PM_SESSION, PM_SESSIONTOOLTIP) |
26 SpewMessage(PM_PERCENT, PM_PERCENTTOOLTIP) | 28 SpewMessage(PM_PERCENT, PM_PERCENTTOOLTIP) |
27 SpewMessage(PM_NUMBER, PM_NUMBERTOOLTIP) | 29 SpewMessage(PM_NUMBER, PM_NUMBERTOOLTIP) |
28 SpewMessage(PM_RESET, PM_RESETTOOLTIP) | 30 SpewMessage(PM_RESET, PM_RESETTOOLTIP) |
29 else | 31 else |
41 ProspectMe.Config.ShowQualities.Junk = ProspectMePoorToggle:GetChecked() | 43 ProspectMe.Config.ShowQualities.Junk = ProspectMePoorToggle:GetChecked() |
42 ProspectMe.Config.ShowQualities.Common = ProspectMeCommonToggle:GetChecked() | 44 ProspectMe.Config.ShowQualities.Common = ProspectMeCommonToggle:GetChecked() |
43 ProspectMe.Config.ShowQualities.Uncommon = ProspectMeUncommonToggle:GetChecked() | 45 ProspectMe.Config.ShowQualities.Uncommon = ProspectMeUncommonToggle:GetChecked() |
44 ProspectMe.Config.ShowQualities.Rare = ProspectMeRareToggle:GetChecked() | 46 ProspectMe.Config.ShowQualities.Rare = ProspectMeRareToggle:GetChecked() |
45 ProspectMe.Config.ShowQualities.Epic = ProspectMeEpicToggle:GetChecked() | 47 ProspectMe.Config.ShowQualities.Epic = ProspectMeEpicToggle:GetChecked() |
48 ProspectMe.Config.ShowEconomics = ProspectMeEconToggle:GetChecked() | |
46 ProspectMe.Config.PerSession = ProspectMeSessionToggle:GetChecked() | 49 ProspectMe.Config.PerSession = ProspectMeSessionToggle:GetChecked() |
47 ProspectMe.Config.ShowPercent = ProspectMePercentToggle:GetChecked() | 50 ProspectMe.Config.ShowPercent = ProspectMePercentToggle:GetChecked() |
48 ProspectMe.Config.ShowNumber = ProspectMeNumberToggle:GetChecked() | 51 ProspectMe.Config.ShowNumber = ProspectMeNumberToggle:GetChecked() |
49 end | 52 end |
50 | 53 |
65 ProspectMeFrame.name = "Prospect Me" | 68 ProspectMeFrame.name = "Prospect Me" |
66 | 69 |
67 ProspectMeTitle:SetPoint("TOP", 0, -16) | 70 ProspectMeTitle:SetPoint("TOP", 0, -16) |
68 ProspectMeTitle:SetText(GetAddOnMetadata("ProspectMe", "Title") .. " v" .. GetAddOnMetadata("ProspectMe", "Version")) | 71 ProspectMeTitle:SetText(GetAddOnMetadata("ProspectMe", "Title") .. " v" .. GetAddOnMetadata("ProspectMe", "Version")) |
69 | 72 |
73 ProspectMeEconToggle:SetPoint( "TOPLEFT", 16, -46 ) | |
74 ProspectMeEconToggle:SetScript("OnClick", UpdateConfig) | |
75 ProspectMeEconToggle:SetChecked(ProspectMe.Config.ShowEconomics) | |
76 ProspectMeEconToggleText:SetText(PM_ECONTOGGLE) | |
77 ProspectMeEconToggle.tooltipText = PM_ECONTOOLTIP | |
78 | |
70 ProspectMeSessionToggle:SetPoint( "TOPLEFT", 32, -46 ) | 79 ProspectMeSessionToggle:SetPoint( "TOPLEFT", 32, -46 ) |
71 ProspectMeSessionToggle:SetScript("OnClick", UpdateConfig) | 80 ProspectMeSessionToggle:SetScript("OnClick", UpdateConfig) |
72 ProspectMeSessionToggle:SetChecked(ProspectMe.Config.PerSession) | 81 ProspectMeSessionToggle:SetChecked(ProspectMe.Config.PerSession) |
73 ProspectMeSessionToggleText:SetText(PM_SESSIONTOGGLE) | 82 ProspectMeSessionToggleText:SetText(PM_SESSIONTOGGLE) |
74 ProspectMeSessionToggle.tooltipText = PM_SESSIONTOOLTIP | 83 ProspectMeSessionToggle.tooltipText = PM_SESSIONTOOLTIP |
135 end | 144 end |
136 | 145 |
137 function SlashCmdList.PROSPECTME(msg, editbox) | 146 function SlashCmdList.PROSPECTME(msg, editbox) |
138 if msg == PM_CONFIG then | 147 if msg == PM_CONFIG then |
139 InterfaceOptionsFrame_OpenToCategory(ProspectMeFrame) | 148 InterfaceOptionsFrame_OpenToCategory(ProspectMeFrame) |
140 elseif msg == PM_RESULTS then | 149 elseif msg == PM_ECON then |
141 ProspectMeResultsToggle:SetChecked(not ProspectMeResultsToggle:GetChecked()) | 150 ProspectMeEconToggle:SetChecked(not ProspectMeEconToggle:GetChecked()) |
142 UpdateConfig() | 151 UpdateConfig() |
143 elseif msg == PM_EPIC then | 152 elseif msg == PM_EPIC then |
144 ProspectMeEpicToggle:SetChecked(not ProspectMeEpicToggle:GetChecked()) | 153 ProspectMeEpicToggle:SetChecked(not ProspectMeEpicToggle:GetChecked()) |
145 UpdateConfig() | 154 UpdateConfig() |
146 elseif msg == PM_RARE then | 155 elseif msg == PM_RARE then |