vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | local _G = getfenv(0) |
2 | -- Frame multipliers |
||
3 | local FxMult, FyMult = 0.9, 0.84 |
||
4 | -- Frame Tab multipliers |
||
5 | local FTxMult, FTyMult = 0.5, 0.75 |
||
6 | |||
7 | function oSkin:InspectFrame() |
||
8 | if not self.db.profile.Inspect or self.initialized.Inspect then return end |
||
9 | self.initialized.Inspect = true |
||
10 | |||
11 | -- hook this to move PVP title |
||
12 | self:Hook("InspectHonorFrame_Update", function() |
||
13 | self:Debug("InspectHonorFrame_Update") |
||
14 | self.hooks.InspectHonorFrame_Update() |
||
15 | self:moveObject(_G["InspectHonorFrameCurrentPVPTitle"], "-", 5, "+", 20) |
||
16 | end) |
||
17 | |||
18 | -- Blow up the Blizz Art |
||
19 | self:removeRegions(_G["InspectFrame"], {1}) |
||
20 | self:removeRegions(_G["InspectPaperDollFrame"], {1, 2, 3, 4}) |
||
21 | self:removeRegions(_G["InspectHonorFrame"], {1, 2, 3, 4, 5, 6, 7, 8}) |
||
22 | |||
23 | _G["InspectModelRotateLeftButton"]:Hide() |
||
24 | _G["InspectModelRotateRightButton"]:Hide() |
||
25 | |||
26 | _G["InspectFrame"]:SetWidth(_G["InspectFrame"]:GetWidth() * FxMult) |
||
27 | _G["InspectFrame"]:SetHeight(_G["InspectFrame"]:GetHeight() * FyMult) |
||
28 | |||
29 | local xOfs, yOfs = 5, 20 |
||
30 | self:moveObject(_G["InspectFrameCloseButton"], "+", 28, "+", 8) |
||
31 | self:moveObject(_G["InspectNameText"], nil, nil, "-", 32) |
||
32 | self:moveObject(_G["InspectModelFrame"], nil, nil, "+", yOfs) |
||
33 | self:moveObject(_G["InspectHeadSlot"], nil, nil, "+", yOfs) |
||
34 | self:moveObject(_G["InspectHandsSlot"], "-", 15, "+", yOfs) |
||
35 | self:moveObject(_G["InspectMainHandSlot"], nil, nil, "-", 38) |
||
36 | |||
37 | -- Honor Frame |
||
38 | self:moveObject(_G["InspectHonorFrameCurrentSessionTitle"], "-", xOfs, "+", yOfs) |
||
39 | self:moveObject(_G["InspectHonorFrameProgressBar"], "-", xOfs, "+", yOfs) |
||
40 | self:glazeStatusBar(_G["InspectHonorFrameProgressBar"], - 2) |
||
41 | |||
42 | -- Frame Tabs |
||
43 | for i = 1, 2 do |
||
44 | local tabName = _G["InspectFrameTab"..i] |
||
45 | self:keepRegions(tabName, {7, 8}) -- N.B. region 7 is text, 8 is highlight |
||
46 | if i == 1 then |
||
47 | self:moveObject(tabName, nil, nil, "-", 70) |
||
48 | else |
||
49 | self:moveObject(tabName, "+", 11, nil, nil) |
||
50 | end |
||
51 | self:applySkin(tabName) |
||
52 | end |
||
53 | |||
54 | self:applySkin(_G["InspectFrame"]) |
||
55 | |||
56 | end |
||
57 | |||
58 | function oSkin:FriendsFrame() |
||
59 | if not self.db.profile.FriendsFrame or self.initialized.FriendsFrame then return end |
||
60 | self.initialized.FriendsFrame = true |
||
61 | |||
62 | self:Hook("FriendsFrame_ShowSubFrame", function(frameName) |
||
63 | self:Debug("FriendsFrame_ShowSubFrame: [%s]", frameName) |
||
64 | self.hooks.FriendsFrame_ShowSubFrame(frameName) |
||
65 | for i, v in FRIENDSFRAME_SUBFRAMES do |
||
66 | -- handle Friends and Ignore on the same Tab |
||
67 | j = ( i > 1 and i - 1 or i) |
||
68 | if v == "CT_RAOptionsFrame" then PanelTemplates_TabResize(0, _G["FriendsFrameTab"..j], nil, 65) end |
||
69 | end |
||
70 | end) |
||
71 | self:hookDDScript(WhoFrameDropDownButton) |
||
72 | self:hookDDScript(GuildControlPopupFrameDropDownButton) |
||
73 | self:Hook("GuildStatus_Update", function() |
||
74 | self:Debug("GuildStatus_Update") |
||
75 | self.hooks.GuildStatus_Update() |
||
76 | local _, _, _, xOfs, _ = _G["GuildFrameGuildListToggleButton"]:GetPoint() |
||
77 | if xOfs == 284 then |
||
78 | self:moveObject(_G["GuildFrameGuildListToggleButton"], "+", 23, "-", 46) |
||
79 | else |
||
80 | self:moveObject(_G["GuildFrameGuildListToggleButton"], nil, nil, "-", 46) |
||
81 | end |
||
82 | end) |
||
83 | |||
84 | -->>-- Friends Frame |
||
85 | self:keepRegions(_G["FriendsFrame"], {6}) -- N.B. 6 is the text region |
||
86 | |||
87 | _G["FriendsFrame"]:SetWidth(_G["FriendsFrame"]:GetWidth() * FxMult) |
||
88 | _G["FriendsFrame"]:SetHeight(_G["FriendsFrame"]:GetHeight() * FyMult) |
||
89 | |||
90 | self:moveObject(_G["FriendsFrameTitleText"], nil, nil, "+", 6) |
||
91 | self:moveObject(_G["FriendsFrameCloseButton"], "+", 30, "+", 8) |
||
92 | |||
93 | self:skinFFToggleTabs("FriendsFrameToggleTab") --N.B. Prefix string |
||
94 | |||
95 | -- FriendsDropDown |
||
96 | -- FriendsListFrame |
||
97 | |||
98 | self:moveObject(_G["FriendsFrameAddFriendButton"], "-", 9, "-", 70) |
||
99 | self:moveObject(_G["FriendsFrameFriendButton1"], nil, nil, "+", 15) |
||
100 | |||
101 | self:removeRegions(_G["FriendsFrameFriendsScrollFrame"]) |
||
102 | self:moveObject(_G["FriendsFrameFriendsScrollFrame"], "+", 35, "+", 14) |
||
103 | self:skinScrollBar(_G["FriendsFrameFriendsScrollFrame"]) |
||
104 | |||
105 | -->>-- Ignore Frame |
||
106 | self:keepRegions(_G["IgnoreListFrame"], {6}) -- N.B. 6 is the text region |
||
107 | |||
108 | _G["IgnoreListFrame"]:SetWidth(_G["IgnoreListFrame"]:GetWidth() * FxMult) |
||
109 | _G["IgnoreListFrame"]:SetHeight(_G["IgnoreListFrame"]:GetHeight() * FyMult) |
||
110 | |||
111 | self:skinFFToggleTabs("IgnoreFrameToggleTab") --N.B. Prefix string |
||
112 | |||
113 | self:moveObject(_G["FriendsFrameIgnorePlayerButton"], "-", 7, "-", 70) |
||
114 | self:moveObject(_G["FriendsFrameIgnoreButton1"], nil, nil, "+", 15) |
||
115 | |||
116 | self:removeRegions(_G["FriendsFrameIgnoreScrollFrame"]) |
||
117 | self:moveObject(_G["FriendsFrameIgnoreScrollFrame"], "+", 35, "+", 14) |
||
118 | self:skinScrollBar(_G["FriendsFrameIgnoreScrollFrame"]) |
||
119 | |||
120 | -->>-- WhoFrame |
||
121 | _G["WhoFrame"]:SetWidth(_G["WhoFrame"]:GetWidth() * FxMult) |
||
122 | _G["WhoFrame"]:SetHeight(_G["WhoFrame"]:GetHeight() * FyMult) |
||
123 | |||
124 | self:skinFFColHeads("WhoFrameColumnHeader") --N.B. Prefix string |
||
125 | |||
126 | self:keepRegions(_G["WhoFrameDropDown"], {4}) -- N.B. region 4 is text |
||
127 | self:moveObject(_G["WhoFrameDropDown"], "+", 5, "+", 1) |
||
128 | self:moveObject(_G["WhoFrameButton1"], nil, nil, "+", 15) |
||
129 | |||
130 | self:removeRegions(_G["WhoListScrollFrame"]) |
||
131 | self:moveObject(_G["WhoListScrollFrame"], "+", 35, "+", 20) |
||
132 | self:skinScrollBar(_G["WhoListScrollFrame"]) |
||
133 | |||
134 | self:moveObject(_G["WhoFrameEditBox"], "+", 20, "-", 65) |
||
135 | local left, right, top, bottom = _G["WhoFrameEditBox"]:GetTextInsets() |
||
136 | _G["WhoFrameEditBox"]:SetTextInsets(left + 5, right + 5, top, bottom) |
||
137 | _G["WhoFrameEditBox"]:SetWidth(_G["WhoFrameEditBox"]:GetWidth() + 30) |
||
138 | _G["WhoFrameEditBox"]:SetHeight(_G["WhoFrameEditBox"]:GetHeight() - 5) |
||
139 | self:applySkin(_G["WhoFrameEditBox"]) |
||
140 | |||
141 | self:moveObject(_G["WhoFrameTotals"], nil, nil, "-", 66) |
||
142 | self:moveObject(_G["WhoFrameGroupInviteButton"], "+", 30, "-", 71) |
||
143 | |||
144 | -->>-- GuildFrame |
||
145 | _G["GuildFrame"]:SetWidth(_G["GuildFrame"]:GetWidth() * FxMult) |
||
146 | _G["GuildFrame"]:SetHeight(_G["GuildFrame"]:GetHeight() * FyMult) |
||
147 | |||
148 | -- show offline members text and checkbox |
||
149 | self:removeRegions(_G["GuildFrameLFGFrame"]) |
||
150 | self:moveObject(_G["GuildFrameLFGButton"], "+", 42, "+", 12) |
||
151 | |||
152 | self:skinFFColHeads("GuildFrameColumnHeader") --N.B. Prefix string |
||
153 | self:skinFFColHeads("GuildFrameGuildStatusColumnHeader") --N.B. Prefix string |
||
154 | |||
155 | self:removeRegions(_G["GuildListScrollFrame"]) |
||
156 | self:moveObject(_G["GuildListScrollFrame"], "+", 35, "+", 20) |
||
157 | self:skinScrollBar(_G["GuildListScrollFrame"]) |
||
158 | |||
159 | self:moveObject(_G["GuildFrameTotals"], "+", 10, "-", 86) |
||
160 | self:moveObject(_G["GuildFrameNotesLabel"], "-", 8, nil, nil) |
||
161 | self:moveObject(_G["GuildFrameControlButton"], "+", 30, "-", 71) |
||
162 | |||
163 | -- where should this be moved to ?, if anywhere |
||
164 | -- self:moveObject(_G["GuildMOTDEditButton"], nil, nil, nil, nil) |
||
165 | |||
166 | -- Guild Control Popup Frame |
||
167 | self:keepRegions(_G["GuildControlPopupFrame"], {5, 6}) --N.B. regions 5 & 6 are text |
||
168 | self:moveObject(_G["GuildControlPopupFrame"], "+", 30, nil, nil) |
||
169 | |||
170 | -- GuildControlPopupFrameCheckboxes |
||
171 | self:keepRegions(_G["GuildControlPopupFrameDropDown"], {4}) -- N.B. region 4 is text |
||
172 | self:removeRegions(_G["GuildControlPopupFrameEditBox"], {6, 7}) -- N.B. all other regions are required |
||
173 | local left, right, top, bottom = _G["GuildControlPopupFrameEditBox"]:GetTextInsets() |
||
174 | _G["GuildControlPopupFrameEditBox"]:SetTextInsets(left + 5, right + 5, top, bottom) |
||
175 | _G["GuildControlPopupFrameEditBox"]:SetWidth(_G["GuildControlPopupFrameEditBox"]:GetWidth() + 30) |
||
176 | _G["GuildControlPopupFrameEditBox"]:SetHeight(_G["GuildControlPopupFrameEditBox"]:GetHeight() - 5) |
||
177 | self:applySkin(_G["GuildControlPopupFrameEditBox"]) |
||
178 | self:applySkin(_G["GuildControlPopupFrame"]) |
||
179 | |||
180 | -- GuildInfoFrame |
||
181 | self:keepRegions(_G["GuildInfoFrame"], {2}) -- N.B. region 2 is text |
||
182 | self:moveObject(_G["GuildInfoTitle"], nil, nil, "+", 3) |
||
183 | |||
184 | self:removeRegions(_G["GuildInfoFrameScrollFrame"]) |
||
185 | self:skinScrollBar(_G["GuildInfoFrameScrollFrame"]) |
||
186 | |||
187 | self:applySkin(_G["GuildInfoTextBackground"]) |
||
188 | self:applySkin(_G["GuildInfoFrame"]) |
||
189 | |||
190 | -- GuildMemberDetailFrame |
||
191 | self:keepRegions(_G["GuildMemberDetailFrame"], {10, 11, 12, 13, 14, 15, 16, 17, 18}) -- N.B. regions 10-18 are text |
||
192 | self:moveObject(_G["GuildMemberDetailFrame"], "+", 28, nil, nil) |
||
193 | self:moveObject(_G["GuildFramePromoteButton"], nil, nil, "-", 30) |
||
194 | self:applySkin(_G["GuildMemberDetailFrame"]) |
||
195 | |||
196 | -->>-- Raid Frame |
||
197 | self:moveObject(_G["RaidFrameConvertToRaidButton"], "-", 30, "+", 10) |
||
198 | |||
199 | if IsAddOnLoaded("Blizzard_RaidUI") then |
||
200 | self:moveObject(_G["RaidFrameAddMemberButton"], "-", 40, "+", 10) |
||
201 | self:moveObject(_G["RaidGroup1"], "-", 7, "+", 8) |
||
202 | end |
||
203 | |||
204 | -- RaidInfoFrame |
||
205 | self:keepRegions(_G["RaidInfoFrame"], {12, 13, 14, 15}) -- N.B. regions 12-15 are text |
||
206 | self:moveObject(_G["RaidInfoFrame"], "+", 35, nil, nil) |
||
207 | self:removeRegions(_G["RaidInfoScrollFrame"]) |
||
208 | self:moveObject(_G["RaidInfoScrollFrame"], "+", 5, nil, nil) |
||
209 | self:skinScrollBar(_G["RaidInfoScrollFrame"]) |
||
210 | self:applySkin(_G["RaidInfoFrame"]) |
||
211 | |||
212 | -->>-- Frame Tabs |
||
213 | for i=1, (IsAddOnLoaded("CT_RaidAssist") and 5 or 4) do |
||
214 | self:keepRegions(_G["FriendsFrameTab"..i], {7, 8}) -- N.B. region 7 is the Text, 8 is the highlight |
||
215 | if i == 1 then |
||
216 | self:moveObject(_G["FriendsFrameTab"..i], "-", 3, "-", 72) |
||
217 | else |
||
218 | self:moveObject(_G["FriendsFrameTab"..i], "+", 9, nil, nil) |
||
219 | end |
||
220 | self:applySkin(_G["FriendsFrameTab"..i]) |
||
221 | end |
||
222 | |||
223 | self:applySkin(_G["FriendsFrame"]) |
||
224 | |||
225 | end |
||
226 | |||
227 | function oSkin:skinFFToggleTabs(tabName) |
||
228 | self:Debug("skinFFToggleTabs: [%s]", tabName) |
||
229 | |||
230 | for i = 1, 2 do |
||
231 | local togTab = _G[tabName..i] |
||
232 | self:keepRegions(_G[tabName..i], {7, 8}) -- N.B. regions 7 & 8 are text/scripts |
||
233 | _G[tabName..i]:SetHeight(_G[tabName..i]:GetHeight() - 5) |
||
234 | if i == 1 then |
||
235 | self:moveObject(_G[tabName..i], nil, nil, "+", 3) |
||
236 | else |
||
237 | self:moveObject(_G[tabName..i]) |
||
238 | end |
||
239 | self:moveObject(_G[tabName..i.."Text"], "-", 2, "+", 3) |
||
240 | self:moveObject(_G[tabName..i.."HighlightTexture"], "-", 2, "+", 5) |
||
241 | self:applySkin(togTab) |
||
242 | end |
||
243 | |||
244 | end |
||
245 | |||
246 | function oSkin:skinFFColHeads(buttonName) |
||
247 | self:Debug("skinFFColHeads: [%s]", buttonName) |
||
248 | |||
249 | for i = 1, 4 do |
||
250 | self:keepRegions(_G[buttonName..i], {4}) -- N.B. region 4 is text |
||
251 | if i == 1 then |
||
252 | self:moveObject(_G[buttonName..i], nil, nil, "+", 25) |
||
253 | else |
||
254 | self:moveObject(_G[buttonName..i]) |
||
255 | end |
||
256 | self:applySkin(_G[buttonName..i]) |
||
257 | end |
||
258 | |||
259 | end |
||
260 | |||
261 | function oSkin:TradeFrame() |
||
262 | if not self.db.profile.TradeFrame or self.initialized.TradeFrame then return end |
||
263 | self.initialized.TradeFrame = true |
||
264 | |||
265 | self:keepRegions(_G["TradeFrame"], {7, 8, 9, 10}) -- N.B. regions 7-10 are text |
||
266 | |||
267 | _G["TradeFrame"]:SetWidth(_G["TradeFrame"]:GetWidth() - 20) |
||
268 | _G["TradeFrame"]:SetHeight(_G["TradeFrame"]:GetHeight() - 80) |
||
269 | |||
270 | self:moveObject(_G["TradeFrameRecipientNameText"], nil, nil, "+", 6) |
||
271 | self:moveObject(_G["TradeFramePlayerNameText"], nil, nil, "+", 6) |
||
272 | |||
273 | -- move everything up |
||
274 | local yOfs = 40 |
||
275 | self:moveObject(_G["TradeFramePlayerEnchantText"], nil, nil, "+", yOfs) |
||
276 | self:moveObject(_G["TradeHighlightPlayer"], nil, nil, "+", yOfs) |
||
277 | self:moveObject(_G["TradeHighlightRecipient"], nil, nil, "+", yOfs) |
||
278 | self:moveObject(_G["TradeRecipientItem1"], nil, nil, "+", yOfs) |
||
279 | self:moveObject(_G["TradePlayerItem1"], nil, nil, "+", yOfs) |
||
280 | self:moveObject(_G["TradeRecipientMoneyFrame"], "+", 20, "+", yOfs) |
||
281 | self:moveObject(_G["TradePlayerInputMoneyFrame"], nil, nil, "+", yOfs) |
||
282 | |||
283 | self:moveObject(_G["TradeFrameTradeButton"], "+", 20, "-", 44) |
||
284 | self:moveObject(_G["TradeFrameCloseButton"], "+", 26, "+", 8) |
||
285 | |||
286 | self:applySkin(_G["TradeFrame"]) |
||
287 | |||
288 | end |
||
289 | |||
290 | function oSkin:QuestLog() |
||
291 | if not self.db.profile.QuestLog or self.initialized.QuestLog then return end |
||
292 | self.initialized.QuestLog = true |
||
293 | |||
294 | self:Hook("QuestLog_UpdateQuestDetails", function(doNotScroll) |
||
295 | self:Debug("QuestLog_UpdateQuestDetails") |
||
296 | self.hooks.QuestLog_UpdateQuestDetails(doNotScroll) |
||
297 | for i = 1, 10 do |
||
298 | local r, g, b, a = _G["QuestLogObjective"..i]:GetTextColor() |
||
299 | _G["QuestLogObjective"..i]:SetTextColor(0.7 - r, 0.7 - g, 0) |
||
300 | end |
||
301 | local r, g, b, a = _G["QuestLogRequiredMoneyText"]:GetTextColor() |
||
302 | _G["QuestLogRequiredMoneyText"]:SetTextColor(0.7 - r, 0.7 - g, 0) |
||
303 | _G["QuestLogRewardTitleText"]:SetTextColor(0.8,0.8,0) |
||
304 | _G["QuestLogItemChooseText"]:SetTextColor(0.7,0.7,0) |
||
305 | _G["QuestLogItemReceiveText"]:SetTextColor(0.7,0.7,0) |
||
306 | end) |
||
307 | |||
308 | self:keepRegions(_G["QuestLogFrame"], {1, 7, 11}) -- N.B. region 1 is dummy, regions 7 & 11 are text |
||
309 | _G["QuestLogFrame"]:SetWidth(_G["QuestLogFrame"]:GetWidth() - 40) |
||
310 | _G["QuestLogFrame"]:SetHeight(_G["QuestLogFrame"]:GetHeight() - 70) |
||
311 | |||
312 | self:moveObject(_G["QuestLogTitleText"], nil, nil, "+", 10) |
||
313 | self:moveObject(_G["QuestLogFrameCloseButton"], "+", 28, "+", 8) |
||
314 | |||
315 | -- movement values |
||
316 | local xOfs, yOfs = 8, 24 |
||
317 | |||
318 | self:moveObject(_G["QuestLogExpandButtonFrame"], "-", xOfs, "+", yOfs) |
||
319 | self:keepRegions(_G["QuestLogCollapseAllButton"], {4, 6}) -- N.B. region 4 is button, 6 is text |
||
320 | -- self:moveObject(_G["QuestLogCollapseAllButton"], "-", xOfs, "+", yOfs) |
||
321 | self:moveObject(_G["QuestLogQuestCount"], nil, nil, "+", 20) |
||
322 | |||
323 | self:keepRegions(_G["EmptyQuestLogFrame"], {5}) -- N.B. region 5 is text |
||
324 | -- QuestLogNoQuestsText |
||
325 | |||
326 | -- QuestLogHighlightFrame |
||
327 | self:moveObject(_G["QuestLogTitle1"], "-", xOfs, "+", yOfs) |
||
328 | self:moveObject(_G["QuestLogListScrollFrame"], "-", xOfs, "+", yOfs) |
||
329 | |||
330 | _G["QuestLogQuestTitle"]:SetTextColor(0.8,0.8,0) |
||
331 | _G["QuestLogObjectivesText"]:SetTextColor(0.7,0.7,0) |
||
332 | |||
333 | for i = 1, 10 do |
||
334 | local r, g, b, a = _G["QuestLogObjective"..i]:GetTextColor() |
||
335 | _G["QuestLogObjective"..i]:SetTextColor(0.7 - r, 0.7 - g, 0) |
||
336 | end |
||
337 | |||
338 | -- _G["QuestLogTimerText"]:SetTextColor(0.8,0.8,0) |
||
339 | |||
340 | self:skinScrollBar(_G["QuestLogListScrollFrame"]) |
||
341 | self:skinScrollBar(_G["QuestLogDetailScrollFrame"]) |
||
342 | |||
343 | -- QuestLogRequiredMoneyText |
||
344 | |||
345 | _G["QuestLogDescriptionTitle"]:SetTextColor(0.8,0.8,0) |
||
346 | _G["QuestLogQuestDescription"]:SetTextColor(0.7,0.7,0) |
||
347 | |||
348 | -- QuestLogItem1-10 |
||
349 | -- QuestLogMoneyFrame |
||
350 | -- QuestLogRequiredMoneyFrame |
||
351 | |||
352 | self:moveObject(_G["QuestLogFrameAbandonButton"], "-", 12, "-", 47) |
||
353 | self:moveObject(_G["QuestFrameExitButton"], "+", 32, "-", 47) |
||
354 | |||
355 | self:applySkin(_G["QuestLogFrame"]) |
||
356 | |||
357 | end |