Mercurial > wow > askmrrobot
comparison Options.lua @ 161:35612aee8e15
Added junk list.
author | yellowfive |
---|---|
date | Mon, 06 May 2019 14:08:03 -0700 |
parents | a3507735dfd9 |
children | 21a69c63fee8 |
comparison
equal
deleted
inserted
replaced
160:d670336e8c89 | 161:35612aee8e15 |
---|---|
2 local L = LibStub("AceLocale-3.0"):GetLocale("AskMrRobot", true) | 2 local L = LibStub("AceLocale-3.0"):GetLocale("AskMrRobot", true) |
3 local AceGUI = LibStub("AceGUI-3.0") | 3 local AceGUI = LibStub("AceGUI-3.0") |
4 | 4 |
5 local _chkMinimap | 5 local _chkMinimap |
6 local _chkAutoGear | 6 local _chkAutoGear |
7 local _chkJunk | |
7 local _chkAh | 8 local _chkAh |
8 local _chkEm | 9 local _chkEm |
9 local _txtScale | 10 local _txtScale |
10 | 11 |
11 local function onTextboxEnter(widget) | 12 local function onTextboxEnter(widget) |
104 _chkMinimap:SetPoint("TOPLEFT", header.frame, "BOTTOMLEFT", 10, -20) | 105 _chkMinimap:SetPoint("TOPLEFT", header.frame, "BOTTOMLEFT", 10, -20) |
105 | 106 |
106 _chkAutoGear, desc2 = createCheck(container, "autoGear", L.OptionsAutoGearName, L.OptionsAutoGearDesc) | 107 _chkAutoGear, desc2 = createCheck(container, "autoGear", L.OptionsAutoGearName, L.OptionsAutoGearDesc) |
107 _chkAutoGear:SetPoint("TOPLEFT", desc.frame, "BOTTOMLEFT", -24, -20) | 108 _chkAutoGear:SetPoint("TOPLEFT", desc.frame, "BOTTOMLEFT", -24, -20) |
108 | 109 |
109 _chkAh, desc = createCheck(container, "shopAh", L.OptionsShopAhName, L.OptionsShopAhDesc) | 110 _chkJunk, desc = createCheck(container, "junkVendor", L.OptionsJunkVendorName, L.OptionsJunkVendorDesc) |
110 _chkAh:SetPoint("TOPLEFT", desc2.frame, "BOTTOMLEFT", -24, -20) | 111 _chkJunk:SetPoint("TOPLEFT", desc2.frame, "BOTTOMLEFT", -24, -20) |
112 | |
113 _chkAh, desc2 = createCheck(container, "shopAh", L.OptionsShopAhName, L.OptionsShopAhDesc) | |
114 _chkAh:SetPoint("TOPLEFT", desc.frame, "BOTTOMLEFT", -24, -20) | |
111 | 115 |
112 _chkEm, desc2 = createCheck(container, "disableEm", L.OptionsDisableEmName, L.OptionsDisableEmDesc) | 116 _chkEm, desc = createCheck(container, "disableEm", L.OptionsDisableEmName, L.OptionsDisableEmDesc) |
113 _chkEm:SetPoint("TOPLEFT", desc.frame, "BOTTOMLEFT", -24, -20) | 117 _chkEm:SetPoint("TOPLEFT", desc2.frame, "BOTTOMLEFT", -24, -20) |
114 | 118 |
115 _txtScale, desc = createSmallTextbox(container, "uiScale", L.OptionsUiScaleName, L.OptionsUiScaleDesc) | 119 _txtScale, desc2 = createSmallTextbox(container, "uiScale", L.OptionsUiScaleName, L.OptionsUiScaleDesc) |
116 _txtScale:SetPoint("TOPLEFT", desc2.frame, "BOTTOMLEFT", -43, -20) | 120 _txtScale:SetPoint("TOPLEFT", desc.frame, "BOTTOMLEFT", -43, -20) |
117 | 121 |
118 -- initialize state of controls | 122 -- initialize state of controls |
119 Amr:RefreshOptionsUi() | 123 Amr:RefreshOptionsUi() |
120 end | 124 end |
121 | 125 |
122 function Amr:ReleaseTabOptions() | 126 function Amr:ReleaseTabOptions() |
123 _chkMinimap = nil | 127 _chkMinimap = nil |
124 _chkAutoGear = nil | 128 _chkAutoGear = nil |
129 _chkJunk = nil | |
125 _chkAh = nil | 130 _chkAh = nil |
126 _chkEm = nil | 131 _chkEm = nil |
127 _txtScale = nil | 132 _txtScale = nil |
128 end | 133 end |
129 | 134 |
134 end | 139 end |
135 | 140 |
136 if _chkAutoGear then | 141 if _chkAutoGear then |
137 _chkAutoGear:SetChecked(self.db.profile.options.autoGear) | 142 _chkAutoGear:SetChecked(self.db.profile.options.autoGear) |
138 end | 143 end |
139 | 144 |
145 if _chkJunk then | |
146 _chkJunk:SetChecked(self.db.profile.options.junkVendor) | |
147 end | |
148 | |
140 if _chkAh then | 149 if _chkAh then |
141 _chkAh:SetChecked(self.db.profile.options.shopAh) | 150 _chkAh:SetChecked(self.db.profile.options.shopAh) |
142 end | 151 end |
143 | 152 |
144 if _chkEm then | 153 if _chkEm then |