vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
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 -- Character subframe names
7  
8 function oSkin:Skin_OneBag()
9 if not self.db.profile.ContainerFrames or self.initialized.OneBag then return end
10 self.initialized.OneBag = true
11  
12 self:applySkin(_G["OneBagFrame"], nil, nil, _G["OneBag"].db.profile.colors.bground.a, 200)
13 if _G["OneRingFrame"] then self:applySkin(_G["OneRingFrame"], nil, nil, _G["OneRing"].db.profile.colors.bground.a, 100) end
14 if _G["OneViewFrame"] then self:applySkin(_G["OneViewFrame"], nil, nil, _G["OneView"].db.profile.colors.bground.a, 200) end
15  
16 end
17  
18 function oSkin:Skin_OneBank()
19 if not self.db.profile.BankFrame or self.initialized.OneBank then return end
20 self.initialized.OneBank = true
21  
22 self:applySkin(_G["OneBankFrame"], nil, nil, _G["OneBank"].db.profile.colors.bground.a, 300)
23  
24 end
25  
26 function oSkin:EnhancedStackSplit()
27 if not self.db.profile.StackSplit then return end
28  
29 _G["StackSplitFrame"]:SetHeight(_G["StackSplitFrame"]:GetHeight() + 40)
30  
31 self:moveObject(_G["StackSplitText"], nil, nil, "+", 20)
32 self:moveObject(_G["StackSplitLeftButton"], "+", 5, "+", 20)
33 self:moveObject(_G["StackSplitRightButton"], "-", 5, "+", 20)
34 self:moveObject(_G["StackSplitOkayButton"], nil, nil, "+", 36)
35 self:moveObject(_G["StackSplitCancelButton"], nil, nil, "+", 36)
36  
37 self:removeRegions(_G["EnhancedStackSplitFrame"], {1})
38  
39 for i = 1, 6 do
40 self:moveObject(_G["EnhancedStackSplitButton"..i], "-", 6, "+", 24)
41 end
42  
43 self:moveObject(_G["EnhancedStackSplitMaxTextFrame"], nil, nil, "+", 20)
44 self:moveObject(_G["EnhancedStackSplitModeTXTButton"], "-", 5, "+", 22)
45  
46 end
47  
48 function oSkin:GMail()
49 if not self.db.profile.MailFrame then return end
50  
51 self:keepRegions(_G["MailFrameTab3"], {7, 8}) -- N.B. region 7 is text, 8 is highlight
52 self:moveObject(_G["MailFrameTab3"], "+", 4, nil, nil)
53 self:applySkin(_G["MailFrameTab3"])
54  
55 self:moveObject(_G["GMailInboxOpenSelected"], "-", 20, "+", 5)
56 self:moveObject(_G["GMailInboxOpenAllButton"], "-", 20, "+", 5)
57  
58 -- reset MailItem1 position
59 self:moveObject(_G["MailItem1"], "-", 5, "-", 5)
60  
61 -- skin the frame
62 self:removeRegions(_G["GMailFrame"], {4, 5}) -- N.B. regions 1, 2 & 3 are text
63 _G["GMailFrame"]:SetWidth(_G["GMailFrame"]:GetWidth() * FxMult)
64 _G["GMailFrame"]:SetHeight(_G["GMailFrame"]:GetHeight() * FyMult)
65  
66 self:moveObject(_G["GMailTitleText"], "+", 5, "-", 35)
67 self:moveObject(_G["GMailNameEditBox"], "-", 5, "+", 10)
68 self:moveObject(_G["GMailCostMoneyFrame"], "+", 40, "+", 10)
69 self:moveObject(_G["GMailMoneyFrame"], "-", 5, "-", 72)
70 self:moveObject(_G["GMailCancelButton"], "+", 34, "-", 72)
71 self:applySkin(_G["GMailFrame"])
72  
73 -- skin the accept send frame
74 self:keepRegions(_G["GMailAcceptSendFrame"], {11, 12, 13, 14})-- N.B. regions 11 - 14 are text
75 self:applySkin(_G["GMailAcceptSendFrame"], 1)
76  
77 self:moveObject(_G["GMailStatusText"], nil, nil, "-", 65)
78 self:moveObject(_G["GMailAbortButton"], nil, nil, "-", 70)
79  
80 self:moveObject(_G["GMailButton1"], "-", 10, "+", 20)
81  
82 -- skin the OpenAll frame
83 self:keepRegions(_G["GMailInboxOpenAll"], {11, 12, 13, 14})-- N.B. regions 11 - 14 are text
84 self:applySkin(_G["GMailInboxOpenAll"], 1)
85  
86 end
87  
88 function oSkin:ViewPort()
89 if not self.db.profile.ViewPort.shown or self.initialized.ViewPort then return end
90 self.initialized.ViewPort = true
91  
92 WorldFrame:SetPoint("TOPLEFT", 0, -(self.db.profile.ViewPort.top * self.db.profile.ViewPort.scaling))
93 WorldFrame:SetPoint("BOTTOMRIGHT", -0, (self.db.profile.ViewPort.bottom * self.db.profile.ViewPort.scaling))
94  
95 end
96  
97 function oSkin:ViewPort_top()
98 if not self.db.profile.ViewPort.shown then return end
99  
100 WorldFrame:SetPoint("TOPLEFT", 0, -(self.db.profile.ViewPort.top * self.db.profile.ViewPort.scaling))
101  
102 end
103  
104 function oSkin:ViewPort_bottom()
105 if not self.db.profile.ViewPort.shown then return end
106  
107 WorldFrame:SetPoint("BOTTOMRIGHT", -0, (self.db.profile.ViewPort.bottom * self.db.profile.ViewPort.scaling))
108  
109 end
110  
111 function oSkin:ViewPort_reset()
112  
113 self.initialized.ViewPort = nil
114 WorldFrame:SetPoint("TOPLEFT", 0, -0)
115 WorldFrame:SetPoint("BOTTOMRIGHT", -0, 0)
116  
117 end
118  
119 function oSkin:TopFrame()
120 if not self.db.profile.TopFrame.shown or self.initialized.TopFrame then return end
121 self.initialized.TopFrame = true
122  
123 local frame = CreateFrame("Frame", "TopFrame", UIParent)
124 frame:SetFrameStrata("BACKGROUND")
125 frame:SetFrameLevel(0)
126 frame:EnableMouse(false)
127 frame:SetMovable(false)
128 frame:SetWidth(self.db.profile.TopFrame.width or 1920)
129 frame:SetHeight(self.db.profile.TopFrame.height or 100)
130 frame:ClearAllPoints()
131 if self.db.profile.TopFrame.xyOff then
132 frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -6, 6)
133 else
134 frame:SetPoint("TOPLEFT", UIParent, "TOPLEFT", -3, 3)
135 end
136 self.topframe = frame
137  
138 oSkin:applySkin(frame, 1, nil, nil, self.db.profile.TopFrame.fheight)
139  
140 end
141  
142 function oSkin:BottomFrame()
143 if not self.db.profile.BottomFrame.shown or self.initialized.BottomFrame then return end
144 self.initialized.BottomFrame = true
145  
146 local frame = CreateFrame("Frame", "BottomFrame", UIParent)
147 frame:SetFrameStrata("BACKGROUND")
148 frame:SetFrameLevel(0)
149 frame:EnableMouse(false)
150 frame:SetMovable(false)
151 frame:SetWidth(self.db.profile.BottomFrame.width or 1920)
152 frame:SetHeight(self.db.profile.BottomFrame.height or 200)
153 frame:ClearAllPoints()
154 if self.db.profile.TopFrame.xyOff then
155 frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", -6, -6)
156 else
157 frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", -3, -3)
158 end
159  
160 self.bottomframe = frame
161  
162 oSkin:applySkin(frame, 1, nil, nil, self.db.profile.BottomFrame.fheight)
163  
164 end
165  
166 function oSkin:SuperInspectFrame()
167 if not self.db.profile.Inspect or self.initialized.SuperInspect then return end
168 self.initialized.SuperInspect = true
169  
170 self:removeRegions(_G["SuperInspectFrameHeader"], {1, 2, 3, 4})
171 self:removeRegions(_G["SuperInspect_ItemBonusesFrame"], {1})
172 self:removeRegions(_G["SuperInspect_COHBonusesFrame"], {1})
173 self:removeRegions(_G["SuperInspect_USEBonusesFrame"], {1})
174 self:removeRegions(_G["SuperInspect_SnTBonusesFrame"], {1})
175  
176 self:removeRegions(_G["SuperInspect_HonorFrame"], {1})
177 self:glazeStatusBar(_G["SuperInspect_HonorFrameProgressBar"], -2)
178  
179 self:removeRegions(_G["SuperInspect_ItemBonusesFrameCompare"], {1})
180  
181 self:removeRegions(_G["SuperInspect_Button_ShowHonor"], {2, 4})
182 self:removeRegions(_G["SuperInspect_Button_ShowBonuses"], {2, 4})
183 self:removeRegions(_G["SuperInspect_Button_ShowMobInfo"], {2, 4})
184 self:removeRegions(_G["SuperInspect_Button_ShowItems"], {2, 4})
185  
186 -- Hide frames we don't need
187 _G["SuperInspect_BackgroundTopLeft"]:Hide()
188 _G["SuperInspect_BackgroundTopRight"]:Hide()
189 _G["SuperInspect_BackgroundBotLeft"]:Hide()
190 _G["SuperInspect_BackgroundBotRight"]:Hide()
191  
192 -- Resize
193 _G["SuperInspectFrameHeader"]:SetWidth(SuperInspectFrameHeader:GetWidth()-20)
194 _G["SuperInspectFrameHeader"]:SetHeight(SuperInspectFrameHeader:GetHeight()-62)
195  
196 -- Reposition
197 _G["SuperInspectFrameHeader_CloseButton"]:ClearAllPoints()
198  
199 _G["SuperInspectFrameHeader_CloseButton"]:SetPoint("CENTER", _G["SuperInspectFrame"], "TOPRIGHT", -20, -20)
200  
201 -- Skin
202 self:applySkin(_G["SuperInspectFrame"])
203 self:applySkin(_G["SuperInspect_ItemBonusesFrame"], nil, 0.6, 0.6)
204 self:applySkin(_G["SuperInspect_COHBonusesFrame"], nil, 0.6, 0.6)
205 self:applySkin(_G["SuperInspect_USEBonusesFrame"], nil, 0.6, 0.6)
206 self:applySkin(_G["SuperInspect_SnTBonusesFrame"], nil, 0.6, 0.6)
207  
208 self:applySkin(_G["SuperInspect_HonorFrame"])
209  
210 self:applySkin(_G["SuperInspect_ItemBonusesFrameCompare"])
211  
212 self:applySkin(_G["SuperInspect_BonusFrameParentTab1"])
213 self:applySkin(_G["SuperInspect_BonusFrameParentTab2"])
214 self:applySkin(_G["SuperInspect_BonusFrameParentTab3"])
215 self:applySkin(_G["SuperInspect_BonusFrameParentTab4"])
216  
217 self:applySkin(_G["SuperInspect_Button_ShowHonor"])
218 self:applySkin(_G["SuperInspect_Button_ShowBonuses"])
219 self:applySkin(_G["SuperInspect_Button_ShowMobInfo"])
220 self:applySkin(_G["SuperInspect_Button_ShowItems"])
221  
222 _G["SuperInspectFramePortrait"]:SetAlpha(0)
223  
224 end
225  
226 function oSkin:CTRA()
227 if not self.db.profile.FriendsFrame then return end
228  
229 self:hookDDScript(CT_RAMenuFrameGeneralDisplayHealthDropDownButton)
230 self:hookDDScript(CT_RAMenuFrameGeneralMiscDropDownButton)
231 self:hookDDScript(CT_RAMenuFrameBuffsBuffsDropDownButton)
232  
233 self:moveObject(_G["CT_RAOptionsButton"], "-", 40, "+", 10)
234 self:moveObject(_G["CT_RACheckAllGroups"], "-", 40, "+", 10)
235 self:moveObject(_G["CT_RAOptionsFrameCheckAllGroupsText"], "-", 40, "+", 10)
236 self:moveObject(_G["CT_RAOptionsGroup1"], "-", 7, "+", 8)
237  
238 self:removeRegions(_G["CT_RAMenuFrame"], {1, 2, 3, 4, 5, 6, 7}) -- N.B. region 8 is text
239 self:moveObject(_G["CT_RAMenuFrameHeader"], nil, nil, "-", 8)
240 self:moveObject(_G["CT_RAMenuFrameCloseButton"], "+", 40, "+", 2)
241 self:applySkin(_G["CT_RAMenuFrame"])
242  
243 self:removeRegions(_G["CT_RAMenuFrameGeneralDisplayHealthDropDown"], {1, 2, 3}) -- N.B. region 4 is text
244 self:removeRegions(_G["CT_RAMenuFrameGeneralMiscDropDown"], {1, 2, 3}) -- N.B. region 4 is text
245 self:removeRegions(_G["CT_RAMenuFrameBuffsBuffsDropDown"], {1, 2, 3}) -- N.B. region 4 is text
246  
247 -->>-- Debuff Frame
248 for _, n in {"NameEB", "DebuffTitleEB", "DebuffTypeEB", "DebuffDescriptEB" } do
249 self:removeRegions(_G["CT_RAMenuFrameDebuffSettings"..n], {6, 7, 8}) -- N.B. regions 1-5 are text/scripts
250 self:moveObject(_G["CT_RAMenuFrameDebuffSettings"..n], "+", 5, "+", 0)
251 local left, right, top, bottom = _G["CT_RAMenuFrameDebuffSettings"..n]:GetTextInsets()
252 _G["CT_RAMenuFrameDebuffSettings"..n]:SetTextInsets(left + 5, right + 5, top, bottom)
253 _G["CT_RAMenuFrameDebuffSettings"..n]:SetWidth(_G["CT_RAMenuFrameDebuffSettings"..n]:GetWidth() + 10)
254 self:applySkin(_G["CT_RAMenuFrameDebuffSettings"..n])
255 end
256  
257 self:skinScrollBar(_G["CT_RAMenuFrameDebuffUseScrollFrame"])
258  
259 -->>-- Priority Frame
260 self:removeRegions(_G["CT_RA_PriorityFrame"], {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}) -- N.B. regions 12 & 13 are text
261 self:moveObject(_G["CT_RA_PriorityFrameTitle"], nil, nil, "-", 8)
262 self:applySkin(_G["CT_RA_PriorityFrame"])
263  
264 self:removeRegions(_G["CT_RAMenu_NewSetFrame"], {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}) -- N.B. regions 11-13 are text
265 self:moveObject(_G["CT_RAMenu_NewSetFrameTitle"], nil, nil, "-", 8)
266 self:applySkin(_G["CT_RAMenu_NewSetFrame"])
267  
268 -->>-- Option Sets Frame
269 self:removeRegions(_G["CT_RAMenu_NewSetFrameNameEB"], {6, 7, 8}) -- N.B. regions 1-5 are text/scripts
270 self:moveObject(_G["CT_RAMenu_NewSetFrameNameEB"], "+", 5, "-", 10)
271 local left, right, top, bottom = _G["CT_RAMenu_NewSetFrameNameEB"]:GetTextInsets()
272 _G["CT_RAMenu_NewSetFrameNameEB"]:SetTextInsets(left + 5, right + 5, top, bottom)
273 _G["CT_RAMenu_NewSetFrameNameEB"]:SetWidth(_G["CT_RAMenu_NewSetFrameNameEB"]:GetWidth() + 10)
274 self:applySkin(_G["CT_RAMenu_NewSetFrameNameEB"])
275  
276 end
277  
278 function oSkin:FramesResized_TradeSkillUI()
279 if not self.db.profile.TradeSkill then return end
280  
281 self:removeRegions(_G["TradeSkillFrame_MidTextures"])
282 self:removeRegions(_G["TradeSkillListScrollFrame_MidTextures"])
283  
284 self:removeRegions(_G["TradeSkillDetailScrollFrame"])
285 self:moveObject(_G["TradeSkillDetailScrollFrame"], "-", 5, nil, nil)
286 self:skinScrollBar(_G["TradeSkillDetailScrollFrame"])
287  
288 self:moveObject(_G["TradeSkillCreateButton"], "-", 10, "-", 70)
289 self:moveObject(_G["TradeSkillCancelButton"], "-", 7, "-", 70)
290  
291 end
292  
293 function oSkin:FramesResized_CraftUI()
294 if not self.db.profile.CraftFrame then return end
295  
296 self:removeRegions(_G["CraftFrame_MidTextures"])
297 self:removeRegions(_G["CraftListScrollFrame_MidTextures"])
298  
299 self:moveObject(_G["CraftCreateButton"], "-", 10, "-", 70)
300 self:moveObject(_G["CraftCancelButton"], "-", 10, "-", 70)
301  
302 end
303  
304 function oSkin:FramesResized_QuestLog()
305 if not self.db.profile.QuestLog then return end
306  
307 self:removeRegions(_G["QuestLogFrame_MidTextures"])
308  
309 end
310  
311 function oSkin:Skin_EnhancedTradeSkills()
312 if not self.db.profile.TradeSkill then return end
313  
314 self:moveObject(_G["ETS_FILTERSONOFF"], "-", 20, nil, nil)
315  
316 end
317  
318 function oSkin:Skin_EnhancedTradeCrafts()
319 if not self.db.profile.CraftFrame then return end
320  
321 self:moveObject(_G["ETS_CFILTERSONOFF"], "-", 10, "-", 72)
322  
323 end
324  
325 function oSkin:AutoProfit()
326 if not self.db.profile.MerchantFrames then return end
327  
328 self:moveObject(_G["TreasureModel"], nil, nil, "+", 28)
329 self:moveObject(_G["AutosellButton"], nil, nil, "+", 28)
330  
331 end
332  
333 function oSkin:FuBar_GarbageFu()
334 if not self.db.profile.MerchantFrames then return end
335  
336 self:moveObject(_G["GarbageFu_SellItemButton"], nil, nil, "+", 28)
337  
338 end
339  
340 function oSkin:GFW_AutoCraft()
341 if not self.db.profile.TradeSkill then return end
342  
343 _G["TradeSkillFrame"]:SetHeight(_G["TradeSkillFrame"]:GetHeight() + 40)
344 self:removeRegions(_G["AutoCraftBackground"])
345  
346 end
347  
348 function oSkin:MetaMap()
349 if not self.db.profile.WorldMap then return end
350  
351 self:hookDDScript(MetaMapFrameDropDownButton)
352  
353 self:Hook("MetaMapMenu_OnShow", function(mode)
354 self.hooks.MetaMapMenu_OnShow(mode)
355 self:keepRegions(_G["MetaMapMenu"], {1}) -- N.B. region 1 is text
356 self:applySkin(_G["MetaMapMenu"])
357 end)
358  
359 for i = 1, 6 do
360 local tabName = _G["MetaMap_DialogFrameTab"..i]
361 self:HookScript(tabName, "OnShow", function()
362 self:Debug(tabName:GetName().."OnShow")
363 self.hooks[tabName].OnShow()
364 tabName:SetWidth(tabName:GetWidth() * 0.85)
365 end)
366 end
367  
368 self:keepRegions(_G["MetaMapFrameDropDown"], {4}) -- N.B. region 4 is text
369 self:moveObject(_G["WorldMapFrameCloseButton"], "-", 10, "-", 5)
370 self:applySkin(_G["MetaMapTopFrame"])
371  
372 self:moveObject(_G["MetaMapSliderMenu"], nil, nil, "-", 10)
373 self:applySkin(_G["MetaMapSliderMenu"])
374  
375 for i = 1, 6 do
376 local tabName = _G["MetaMap_DialogFrameTab"..i]
377 self:keepRegions(tabName, {7}) -- N.B. region 7 is text
378 tabName:SetHeight(tabName:GetHeight() * (FTyMult + FTyMult))
379 if i == 1 then
380 self:moveObject(tabName, nil, nil, "_", 8)
381 else
382 self:moveObject(tabName, "+", 15, nil, nil)
383 end
384 self:applySkin(tabName)
385 end
386  
387 self:moveObject(_G["MetaMap_CloseButton"], nil, nil, "_", 2)
388  
389 self:applySkin(_G["MetaMap_DialogFrame"], 1)
390  
391 end
392  
393 function oSkin:LootLink()
394  
395 self:hookDDScript(LootLinkFrameDropDownButton)
396 self:hookDDScript(LLS_BindsDropDownButton)
397 self:hookDDScript(LLS_RarityDropDownButton)
398 self:hookDDScript(LLS_LocationDropDownButton)
399 self:hookDDScript(LLS_TypeDropDownButton)
400 self:hookDDScript(LLS_SubtypeDropDownButton)
401 self:hookDDScript(LLO_RarityDropDownButton)
402  
403 -- self:moveObject(_G["LootLinkTitleText"], "+", 100, "+", 300)
404  
405 -- self:removeRegions(_G["LootLinkUpdateFrame"])
406 self:removeRegions(_G["LootLinkFrame"], {2, 3, 4, 5})
407 -- self:removeRegions(_G["LootLinkHighlightFrame"])
408  
409 _G["LootLinkFrame"]:SetWidth(_G["LootLinkFrame"]:GetWidth() - 30)
410 _G["LootLinkFrame"]:SetHeight(_G["LootLinkFrame"]:GetHeight() - 70)
411  
412 self:moveObject(_G["LootLinkFrameCloseButton"], "+", 15, nil, nil)
413 self:moveObject(_G["LootLinkTitleText"], "+", 15, nil, nil)
414  
415 self:removeRegions(_G["LootLinkListScrollFrame"])
416 self:skinScrollBar(_G["LootLinkListScrollFrame"])
417  
418 self:skinTooltip(LootLinkTooltip)
419 self:skinTooltip(LLHiddenTooltip)
420  
421 self:applySkin(_G["LootLinkFrame"], {2, 3, 4, 5})
422 -- self:applySkin(_G["LootLinkHighlightFrame"])
423 self:applySkin(_G["LootLinkSearchFrame"])
424 self:applySkin(_G["LootLinkOptionsFrame"])
425 -- self:applySkin(_G["LootLinkUpdateFrame"])
426  
427 end
428  
429 function oSkin:Possessions()
430  
431 self:hookDDScript(Possessions_CharDropDownButton)
432 self:hookDDScript(Possessions_LocDropDownButton)
433 self:hookDDScript(Possessions_SlotDropDownButton)
434  
435 self:removeRegions(_G["Possessions_IC_ScrollFrame"])
436 self:skinScrollBar(_G["Possessions_IC_ScrollFrame"])
437  
438 self:applySkin(_G["Possessions_Frame"])
439  
440 end
441  
442 function oSkin:EQL3Frame()
443 if not self.db.profile.QuestLog or self.initialized.QuestLog then return end
444 self.initialized.QuestLog = true
445  
446 self:Hook("QuestLog_UpdateQuestDetails", function(doNotScroll)
447 self:Debug("QuestLog_UpdateQuestDetails")
448 self.hooks.QuestLog_UpdateQuestDetails(doNotScroll)
449 for i = 1, 10 do
450 local r, g, b, a = _G["EQL3_QuestLogObjective"..i]:GetTextColor()
451 _G["EQL3_QuestLogObjective"..i]:SetTextColor(0.7 - r, 0.7 - g, 0)
452 end
453 local r, g, b, a = _G["EQL3_QuestLogRequiredMoneyText"]:GetTextColor()
454 _G["EQL3_QuestLogRequiredMoneyText"]:SetTextColor(0.7 - r, 0.7 - g, 0)
455 _G["EQL3_QuestLogRewardTitleText"]:SetTextColor(0.8,0.8,0)
456 _G["EQL3_QuestLogItemChooseText"]:SetTextColor(0.7,0.7,0)
457 _G["EQL3_QuestLogItemReceiveText"]:SetTextColor(0.7,0.7,0)
458 end)
459  
460 self:removeRegions(_G["EQL3_QuestLogFrame"])
461 self:removeRegions(_G["EQL3_QuestLogFrame_Description"])
462 self:keepRegions(_G["EQL3_QuestLogFrame_Details"], {1,2,6})
463 self:removeRegions(_G["EQL3_QuestFrameOptionsButton"],{2,4})
464 self:removeRegions(_G["EQL3_QuestFramePushQuestButton"],{2,4})
465 self:removeRegions(_G["EQL3_QuestLogFrameAbandonButton"],{2,4})
466 self:removeRegions(_G["EQL3_QuestLogDetailScrollFrame"])
467  
468 self:moveObject(_G["EQL3_QuestLogFrameCloseButton"], "+", 25, nil, nil)
469 self:moveObject(_G["EQL3_QuestLogFrameAbandonButtonText"], nil, nil, "+", 2)
470 self:moveObject(_G["EQL3_QuestFramePushQuestButtonText"], nil, nil, "+", 2)
471 self:moveObject(_G["EQL3_QuestFrameOptionsButtonText"], nil, nil, "+", 2)
472 self:moveObject(_G["EQL3_QuestLogDetailScrollFrame"], "+", 40, nil, nil)
473  
474 _G["EQL3_QuestLogFrame_Description"]:SetWidth(_G["EQL3_QuestLogFrame_Description"]:GetWidth() + 40)
475 _G["EQL3_QuestLogFrame"]:SetWidth(_G["EQL3_QuestLogFrame"]:GetWidth() - 20)
476  
477 _G["EQL3_QuestLogTitleText"]:ClearAllPoints()
478 _G["EQL3_QuestLogTitleText"]:SetPoint("TOPLEFT", _G["EQL3_QuestLogFrame"], "TOPLEFT", 15, -10)
479  
480 _G["EQL3_QuestLogVersionText"]:ClearAllPoints()
481 _G["EQL3_QuestLogVersionText"]:SetPoint("TOPLEFT", _G["EQL3_QuestLogTitleText"], "TOPRIGHT", -100, 0)
482  
483 _G["EQL3_QuestLogQuestCount"]:ClearAllPoints()
484 _G["EQL3_QuestLogQuestCount"]:SetPoint("TOPLEFT", _G["EQL3_QuestLogTrackTitle"], "TOPRIGHT", 40, 0)
485  
486  
487 _G["EQL3_QuestLogQuestTitle"]:SetTextColor(0.8,0.8,0)
488 _G["EQL3_QuestLogObjectivesText"]:SetTextColor(0.7,0.7,0)
489 _G["EQL3_QuestLogDescriptionTitle"]:SetTextColor(0.8,0.8,0)
490 _G["EQL3_QuestLogQuestDescription"]:SetTextColor(0.7,0.7,0)
491  
492 self:skinScrollBar(_G["EQL3_QuestLogListScrollFrame"])
493 self:skinScrollBar(_G["EQL3_QuestLogDetailScrollFrame"])
494  
495 self:applySkin(_G["EQL3_QuestLogFrame"])
496 self:applySkin(_G["EQL3_QuestFrameOptionsButton"])
497 self:applySkin(_G["EQL3_QuestFramePushQuestButton"])
498 self:applySkin(_G["EQL3_QuestLogFrameAbandonButton"])
499 self:applySkin(_G["EQL3_QuestLogFrame_Description"])
500  
501 self:removeRegions(_G["EQL3_OptionsFrame"], {1}) -- region 2 is the title
502 self:removeRegions(_G["EQL3_OptionsFrame_Button_RestoreColors"],{2,4})
503 self:removeRegions(_G["EQL3_OptionsFrame_Button_RestoreTracker"],{2,4})
504 self:removeRegions(_G["EQL3_OptionsFrame_Button_QuestLog"],{2,4})
505  
506 self:applySkin(_G["EQL3_OptionsFrame"])
507 self:applySkin(_G["EQL3_OptionsFrame_Button_RestoreColors"])
508 self:applySkin(_G["EQL3_OptionsFrame_Button_RestoreTracker"])
509 self:applySkin(_G["EQL3_OptionsFrame_Button_QuestLog"])
510  
511 end
512  
513 function oSkin:BattleChat()
514  
515 self:applySkin(_G["BattleChat"].frame)
516 BattleChat.frame:SetBackdropColor(0, 0, 0, BattleChat.db.profile.alpha * 0.01)
517 BattleChat.frame:SetBackdropBorderColor(0, 0, 0, BattleChat.db.profile.alpha * 0.01 * 4/3)
518  
519 end
520  
521 function oSkin:KombatStats()
522  
523 oSkin:applySkin(KombatStatsFrame)
524 if KombatStats.dpsButton then
525 oSkin:applySkin(KombatStats.dpsButton)
526 end
527  
528 end
529  
530 function oSkin:FruityLoots_LF_SetPoint(obj, flx, fly)
531  
532 local screenWidth = GetScreenWidth()
533 if (UIParent:GetWidth() > screenWidth) then screenWidth = UIParent:GetWidth() end
534 local screenHeight = GetScreenHeight()
535 -- LootFrame is set to 256 wide in the xml file, but is actually only 191 wide
536 -- This is based on calculation envolving the offset on the close button:
537 -- The height is always 256, which is the correct number.
538 local windowWidth = 191
539 local windowHeight = 256
540 if (flx + windowWidth) > screenWidth then flx = screenWidth - windowWidth end
541 if fly > screenHeight then fly = screenHeight end
542 if flx < 0 then flx = 0 end
543 if (fly - windowHeight) < 0 then fly = windowHeight end
544  
545 _G["LootFrame"]:ClearAllPoints()
546 _G["LootFrame"]:SetPoint("TOPLEFT", "UIParent", "BOTTOMLEFT", flx, fly - 44)
547  
548 end
549  
550 function oSkin:FramesResized_LootFrame()
551 if not self.db.profile.LootFrame then return end
552  
553 for i = 5, NUM_GROUP_LOOT_FRAMES do
554 _G["LootButton"..i]:ClearAllPoints()
555 _G["LootButton"..i]:SetPoint("TOP", _G["LootButton"..i - 1], "BOTTOM", 0, -4)
556 end
557  
558 end
559  
560 function oSkin:skinMCP()
561  
562 if _G["MCPAddonSetDropDown"] then
563 -- Rophy's version on the SVN
564 self:hookDDScript(MCPAddonSetDropDownButton)
565 self:keepRegions(_G["MCPAddonSetDropDown"], {4}) -- N.B. region 4 is text
566 self:moveObject(_G["MCPAddonSetDropDown"], nil, nil, "-", 13)
567 self:moveObject(_G["MCP_AddonListDisableAll"], nil, nil, nil, nil)
568 self:moveObject(_G["MCP_AddonListEnableAll"], nil, nil, nil, nil)
569 self:moveObject(_G["MCP_AddonListSaveSet"], nil, nil, "-", 10)
570 self:moveObject(_G["MCP_AddonList_ReloadUI"], nil, nil, "-", 10)
571 else
572 -- standard version from Curse
573 self:hookDDScript(MCP_AddonList_ProfileSelectionButton)
574 self:keepRegions(_G["MCP_AddonList_ProfileSelection"], {4}) -- N.B. region 4 is text
575 self:moveObject(_G["MCP_AddonList_ProfileSelection"], nil, nil, "-", 13)
576 self:moveObject(_G["MCP_AddonList_EnableAll"], "+", 30, "+", 5)
577 self:moveObject(_G["MCP_AddonList_DisableAll"], "+", 30, "+", 5)
578 self:moveObject(_G["MCP_AddonList_SaveProfile"], "+", 40, "-", 10)
579 self:moveObject(_G["MCP_AddonList_DeleteProfile"], "+", 40, "-", 10)
580 self:moveObject(_G["MCP_AddonList_ReloadUI"], "+", 30, "+", 5)
581 end
582  
583 -- change the scale to match other frames
584 _G["MCP_AddonList"]:SetScale(_G["GameMenuFrame"]:GetEffectiveScale())
585  
586 self:keepRegions(_G["MCP_AddonList"], {8}) -- N.B. region 8 is the title
587 _G["MCP_AddonList"]:SetWidth(_G["MCP_AddonList"]:GetWidth() * FxMult)
588 _G["MCP_AddonList"]:SetHeight(_G["MCP_AddonList"]:GetHeight() * FyMult)
589  
590 -- resize the frame's children to match the frame size
591 for i, v in ipairs({ _G["MCP_AddonList"]:GetChildren() }) do
592 v:SetWidth(v:GetWidth() * FxMult)
593 v:SetHeight(v:GetHeight() * FyMult)
594 end
595  
596 self:moveObject(_G["MCP_AddonListCloseButton"], "+", 40, nil, nil)
597 self:moveObject(_G["MCP_AddonListEntry1"], nil, nil, "+", 10)
598 self:removeRegions(_G["MCP_AddonList_ScrollFrame"])
599 self:moveObject(_G["MCP_AddonList_ScrollFrame"], "+", 26, "+", 7)
600 _G["MCP_AddonList_ScrollFrame"]:SetHeight(_G["MCP_AddonList_ScrollFrame"]:GetHeight() + 10)
601 self:skinScrollBar(_G["MCP_AddonList_ScrollFrame"])
602  
603 self:applySkin(_G["MCP_AddonList"], 1)
604  
605 end
606  
607  
608 function oSkin:CT_MailMod()
609 if not self.db.profile.MailFrame then return end
610  
611 self:keepRegions(_G["MailFrameTab3"], {7, 8}) -- N.B. region 7 is text, 8 is highlight
612 self:moveObject(_G["MailFrameTab3"], "+", 4, nil, nil)
613 self:applySkin(_G["MailFrameTab3"])
614  
615 self:moveObject(_G["CT_MMInboxOpenSelected"], "-", 20, "+", 5)
616 self:moveObject(_G["CT_MMInboxOpenAll"], "-", 20, "+", 5)
617  
618 -- reset MailItem1 position
619 self:moveObject(_G["MailItem1"], "-", 5, "-", 5)
620  
621 -- skin the frame
622 self:removeRegions(_G["CT_MailFrame"], {4, 5}) -- N.B. regions 1, 2 & 3 are text
623 _G["CT_MailFrame"]:SetWidth(_G["CT_MailFrame"]:GetWidth() * FxMult)
624 _G["CT_MailFrame"]:SetHeight(_G["CT_MailFrame"]:GetHeight() * FyMult)
625  
626 self:moveObject(_G["CT_MailTitleText"], "+", 5, "-", 35)
627 self:moveObject(_G["CT_MailNameEditBox"], "-", 5, "+", 10)
628 self:moveObject(_G["CT_MailCostMoneyFrame"], "+", 40, "+", 10)
629 self:moveObject(_G["CT_MailMoneyFrame"], "-", 5, "-", 72)
630 self:moveObject(_G["CT_MailCancelButton"], "+", 34, "-", 72)
631 self:applySkin(_G["CT_MailFrame"])
632  
633 -- skin the accept send frame
634 self:keepRegions(_G["CT_Mail_AcceptSendFrame"], {11, 12, 13, 14})-- N.B. regions 11 - 14 are text
635 self:applySkin(_G["CT_Mail_AcceptSendFrame"], 1)
636  
637 self:moveObject(_G["CT_MailStatusText"], nil, nil, "-", 65)
638 self:moveObject(_G["CT_MailAbortButton"], nil, nil, "-", 70)
639  
640 self:moveObject(_G["CT_MailButton1"], "-", 10, "+", 20)
641  
642 -- skin the OpenAll frame
643 self:keepRegions(_G["CT_MMInbox_OpenAll"], {11, 12, 13, 14})-- N.B. regions 11 - 14 are text
644 self:applySkin(_G["CT_MMInbox_OpenAll"], 1)
645  
646 end
647  
648 function oSkin:ItemSync()
649  
650 self:hookDDScript(ISync_MainFrame_DropDownButton)
651 self:hookDDScript(ISync_Location_DropDownButton)
652 self:hookDDScript(ISync_Rarity_DropDownButton)
653 self:hookDDScript(ISync_Weapons_DropDownButton)
654 self:hookDDScript(ISync_Level_DropDownButton)
655 self:hookDDScript(ISync_Tradeskills_DropDownButton)
656 self:hookDDScript(ISync_Armor_DropDownButton)
657 self:hookDDScript(ISync_Shield_DropDownButton)
658 self:hookDDScript(ISync_FavFrame_DropDownButton)
659 self:hookDDScript(ISync_FilterPurgeRare_DropDownButton)
660  
661 for i = 1, 4 do
662 self:removeRegions(_G["ISync_OptionsFrameTab"..i], {1, 2, 3, 4})
663 self:moveObject(_G["ISync_OptionsFrameTab"..i], "+", 15, nil, nil)
664 self:applySkin(_G["ISync_OptionsFrameTab"..i])
665 end
666  
667 self:applySkin(_G["ISync_MainFrame"])
668 self:applySkin(_G["ISync_SearchFrame"])
669 self:applySkin(_G["ISync_BV_Frame"])
670 self:applySkin(_G["ISync_FavFrame"])
671 self:applySkin(_G["ISync_FiltersFrame"])
672 self:applySkin(_G["ISync_OptionsFrame"])
673  
674 end
675  
676 function oSkin:Skin_aftte()
677  
678 bd = {
679 bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = true, tileSize = 16,
680 edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 16,
681 insets = {left = 4, right = 4, top = 4, bottom = 4},
682 }
683  
684 self:applySkin(_G["aftt_descriptFrame"], nil, nil, nil, nil, bd)
685 self:applySkin(_G["aftt_targettargetframe"], nil, nil, nil, nil, bd)
686 self:applySkin(_G["aftt_tooltipFrame"], nil, nil, nil, nil, bd)
687 end
688  
689 function oSkin:EasyUnlock()
690  
691 self:Hook("EasyUnlock_DoFrameCheck", function()
692 self.hooks.EasyUnlock_DoFrameCheck()
693 self:moveObject(_G["TradeFrameTradeButton"], "+", 20, "-", 40)
694 end)
695  
696 end