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 | -- Character subframe names |
||
7 | |||
8 | function oSkin:menuFrames() |
||
9 | if not self.db.profile.MenuFrames or self.initialized.MenuFrames then return end |
||
10 | self.initialized.MenuFrames = true |
||
11 | |||
12 | self:hookDDScript(OptionsFrameResolutionDropDownButton) |
||
13 | self:hookDDScript(OptionsFrameRefreshDropDownButton) |
||
14 | self:hookDDScript(OptionsFrameMultiSampleDropDownButton) |
||
15 | |||
16 | self:applySkin(_G["GameMenuFrame"], 1, nil, nil, 100) |
||
17 | |||
18 | -- Video Options |
||
19 | self:applySkin(_G["OptionsFrame"], 1, nil, nil, 300) |
||
20 | |||
21 | self:keepRegions(_G["OptionsFrameResolutionDropDown"], {4}) -- N.B. region 4 is text |
||
22 | self:keepRegions(_G["OptionsFrameRefreshDropDown"], {4}) -- N.B. region 4 is text |
||
23 | self:keepRegions(_G["OptionsFrameMultiSampleDropDown"], {4}) -- N.B. region 4 is text |
||
24 | |||
25 | self:applySkin(_G["OptionsFrameDisplay"]) |
||
26 | self:applySkin(_G["OptionsFrameWorldAppearance"]) |
||
27 | self:applySkin(_G["OptionsFrameBrightness"]) |
||
28 | self:applySkin(_G["OptionsFramePixelShaders"]) |
||
29 | self:applySkin(_G["OptionsFrameMiscellaneous"]) |
||
30 | |||
31 | -- Sound |
||
32 | self:applySkin(_G["SoundOptionsFrame"], 1, nil, nil, 100) |
||
33 | |||
34 | -- Interface |
||
35 | self:HookScript(UIOptionsFrameTab1, "OnClick", function() |
||
36 | self:Debug("UIOFT1_OnClick") |
||
37 | self.hooks[UIOptionsFrameTab1].OnClick() |
||
38 | self:moveObject(_G["UIOptionsFrameTab2"], nil, nil, "+", 1) |
||
39 | end) |
||
40 | self:HookScript(UIOptionsFrameTab2, "OnClick", function() |
||
41 | self:Debug("UIOFT2_OnClick") |
||
42 | self.hooks[UIOptionsFrameTab2].OnClick() |
||
43 | self:moveObject(_G["UIOptionsFrameTab2"], nil, nil, "-", 1) |
||
44 | end) |
||
45 | self:hookDDScript(UIOptionsFrameClickCameraDropDownButton) |
||
46 | self:hookDDScript(UIOptionsFrameTargetofTargetDropDownButton) |
||
47 | self:hookDDScript(UIOptionsFrameCombatTextDropDownButton) |
||
48 | |||
49 | self:keepRegions(_G["UIOptionsFrame"], {1}) -- N.B. region 1 is text |
||
50 | -- change this to allow Frames to be resized |
||
51 | _G["UIOptionsFrame"]:SetParent(_G["GameMenuFrame"]:GetParent()) |
||
52 | |||
53 | -- get the title text and move it |
||
54 | for i,v in ipairs({ _G["UIOptionsFrame"]:GetRegions() }) do |
||
55 | -- region 1 is the title |
||
56 | if i == 1 then |
||
57 | self:moveObject(v, nil, nil, "-", 170) |
||
58 | break |
||
59 | end |
||
60 | end |
||
61 | |||
62 | -- change these to allow the buttons to work |
||
63 | _G["UIOptionsFrameDefaults"]:SetFrameStrata(_G["GameMenuFrame"]:GetFrameStrata()) |
||
64 | _G["UIOptionsFrameOkay"]:SetFrameStrata(_G["GameMenuFrame"]:GetFrameStrata()) |
||
65 | _G["UIOptionsFrameCancel"]:SetFrameStrata(_G["GameMenuFrame"]:GetFrameStrata()) |
||
66 | |||
67 | -- find the Close button and move it |
||
68 | for i,v in ipairs({ _G["UIOptionsFrame"]:GetChildren() }) do |
||
69 | local point, relativeTo, relativePoint, xOfs, yOfs = v:GetPoint() |
||
70 | if point == "TOPRIGHT" and relativeTo:GetName() == "BasicOptions" then |
||
71 | v:SetFrameStrata(_G["GameMenuFrame"]:GetFrameStrata()) |
||
72 | self:moveObject(v, "-", 8, "-", 8) |
||
73 | end |
||
74 | end |
||
75 | |||
76 | -- BasicOptions |
||
77 | _G["BasicOptions"]:SetWidth(_G["BasicOptions"]:GetWidth() * 0.95) |
||
78 | _G["BasicOptions"]:SetHeight(_G["BasicOptions"]:GetHeight() * FyMult) |
||
79 | self:keepRegions(_G["UIOptionsFrameClickCameraDropDown"], {4}) -- N.B. region 4 is text |
||
80 | self:applySkin(_G["BasicOptionsGeneral"]) |
||
81 | self:applySkin(_G["BasicOptionsDisplay"]) |
||
82 | self:applySkin(_G["BasicOptionsCamera"]) |
||
83 | self:applySkin(_G["BasicOptionsHelp"]) |
||
84 | self:applySkin(_G["BasicOptions"]) |
||
85 | |||
86 | -- AdvancedOptions |
||
87 | _G["AdvancedOptions"]:SetWidth(_G["AdvancedOptions"]:GetWidth() * 0.95) |
||
88 | _G["AdvancedOptions"]:SetHeight(_G["AdvancedOptions"]:GetHeight() * FyMult) |
||
89 | self:keepRegions(_G["UIOptionsFrameTargetofTargetDropDown"], {4}) -- N.B. region 4 is text |
||
90 | self:keepRegions(_G["UIOptionsFrameCombatTextDropDown"], {4}) -- N.B. region 4 is text |
||
91 | self:applySkin(_G["AdvancedOptionsActionBars"]) |
||
92 | self:applySkin(_G["AdvancedOptionsChat"]) |
||
93 | self:applySkin(_G["AdvancedOptionsRaid"]) |
||
94 | self:applySkin(_G["AdvancedOptionsCombatText"]) |
||
95 | self:applySkin(_G["AdvancedOptions"]) |
||
96 | |||
97 | for i = 1, 2 do |
||
98 | local tabName = _G["UIOptionsFrameTab"..i] |
||
99 | self:keepRegions(tabName, {7, 8}) -- N.B. region 7 is text, 8 is highlight |
||
100 | tabName:SetFrameStrata(_G["GameMenuFrame"]:GetFrameStrata()) |
||
101 | tabName:SetHeight(tabName:GetHeight() * FTyMult) |
||
102 | if i == 2 then |
||
103 | self:moveObject(tabName, nil, nil, "+", 1) |
||
104 | end |
||
105 | self:moveObject(_G[tabName:GetName().."Text"], nil, nil, "+", 5) |
||
106 | self:moveObject(_G[tabName:GetName().."HighlightTexture"], nil, nil, "+", 8) |
||
107 | self:applySkin(tabName) |
||
108 | end |
||
109 | |||
110 | -- Others |
||
111 | self:applySkin(_G["ScriptErrors"]) |
||
112 | self:applySkin(_G["ColorPickerFrame"], 1, nil, nil, 100) |
||
113 | |||
114 | if IsAddOnLoaded("Blizzard_MacroUI") then self:MacroFrame() end |
||
115 | if IsAddOnLoaded("Blizzard_BindingUI") then self:KeyBindingFrame() end |
||
116 | |||
117 | end |
||
118 | |||
119 | function oSkin:MacroFrame() |
||
120 | if not self.db.profile.MenuFrames or self.initialized.MacroFrame then return end |
||
121 | self.initialized.MacroFrame = true |
||
122 | |||
123 | self:keepRegions(_G["MacroFrame"], {6, 9, 10, 11 ,12}) -- N.B. regions 6, 9-12 are text |
||
124 | _G["MacroFrame"]:SetWidth(_G["MacroFrame"]:GetWidth() * FxMult) |
||
125 | _G["MacroFrame"]:SetHeight(_G["MacroFrame"]:GetHeight() * FyMult) |
||
126 | |||
127 | for i = 1, 2 do |
||
128 | local tabName = _G["MacroFrameTab"..i] |
||
129 | self:keepRegions(tabName, {7, 8}) -- N.B. region 7 is text, 8 is highlight |
||
130 | self:moveObject(_G[tabName:GetName().."Text"], nil, nil, "+", 5) |
||
131 | self:moveObject(_G[tabName:GetName().."HighlightTexture"], nil, nil, "+", 8) |
||
132 | self:applySkin(tabName) |
||
133 | end |
||
134 | |||
135 | |||
136 | self:moveObject(_G["MacroFrameCloseButton"], "+", 28, "+", 8) |
||
137 | self:moveObject(_G["MacroButton1"], "-", 10, nil, nil) |
||
138 | self:moveObject(_G["MacroFrameSelectedMacroBackground"], nil, nil, "+", 10) |
||
139 | self:moveObject(_G["MacroFrameTextBackground"], nil, nil, "+", 10) |
||
140 | self:moveObject(_G["MacroDeleteButton"], "-", 10, "-", 72) |
||
141 | self:moveObject(_G["MacroNewButton"], "-", 4, "+", 10) |
||
142 | self:moveObject(_G["MacroExitButton"], "-", 4, "+", 10) |
||
143 | self:moveObject(_G["MacroFrameCharLimitText"], nil, nil, "-", 75) |
||
144 | |||
145 | self:skinScrollBar(_G["MacroFrameScrollFrame"]) |
||
146 | self:applySkin(_G["MacroFrameTextBackground"]) |
||
147 | self:applySkin(_G["MacroFrame"]) |
||
148 | |||
149 | -- Macro Popup Frame |
||
150 | self:keepRegions(_G["MacroPopupFrame"], {5, 6}) -- N.B. regions 5 & 6 are text |
||
151 | _G["MacroPopupFrame"]:SetWidth(_G["MacroPopupFrame"]:GetWidth() * FxMult) |
||
152 | _G["MacroPopupFrame"]:SetHeight(_G["MacroPopupFrame"]:GetHeight() - 20) -- N.B. must be absolute not multiple |
||
153 | self:moveObject(_G["MacroPopupFrame"], "+", 40, nil, nil) |
||
154 | |||
155 | local xOfs, yOfs = 5, 15 |
||
156 | self:moveObject(_G["MacroPopupEditBox"], "-", xOfs, "+", yOfs) |
||
157 | self:moveObject(_G["MacroPopupScrollFrame"], "+", 10, "+", yOfs) |
||
158 | self:moveObject(_G["MacroPopupButton1"], "-", xOfs, "+", yOfs) |
||
159 | self:moveObject(_G["MacroPopupCancelButton"], nil, nil, "-", 4) |
||
160 | |||
161 | for i,v in ipairs({ _G["MacroPopupFrame"]:GetRegions() }) do |
||
162 | -- regions 5 & 6 are text |
||
163 | if i == 5 or i == 6 then |
||
164 | self:moveObject(v, "-", xOfs, "+", yOfs) |
||
165 | end |
||
166 | end |
||
167 | |||
168 | self:removeRegions(_G["MacroPopupScrollFrame"]) |
||
169 | self:skinScrollBar(_G["MacroPopupScrollFrame"]) |
||
170 | self:applySkin(_G["MacroPopupFrame"]) |
||
171 | |||
172 | end |
||
173 | |||
174 | function oSkin:KeyBindingFrame() |
||
175 | if not self.db.profile.MenuFrames or self.initialized.KeyBindingFrame then return end |
||
176 | self.initialized.KeyBindingFrame = true |
||
177 | |||
178 | self:keepRegions(_G["KeyBindingFrame"], {7, 8, 9, 10, 12}) -- N.B. regions 7-10 & 12 are text |
||
179 | _G["KeyBindingFrame"]:SetWidth(_G["KeyBindingFrame"]:GetWidth() * 0.95) |
||
180 | -- N.B. Don't change Height |
||
181 | |||
182 | self:moveObject(_G["KeyBindingFrameHeaderText"], nil, nil, "-", 8) |
||
183 | self:moveObject(_G["KeyBindingFrameCharacterButton"], "+", 30, "+", 5) |
||
184 | self:moveObject(_G["KeyBindingFrameOutputText"], nil, nil, "-", 10) |
||
185 | self:moveObject(_G["KeyBindingFrameDefaultButton"], nil, nil, "-", 14) |
||
186 | self:moveObject(_G["KeyBindingFrameCancelButton"], "+", 40, "-", 14) |
||
187 | |||
188 | self:removeRegions(_G["KeyBindingFrameScrollFrame"]) |
||
189 | self:skinScrollBar(_G["KeyBindingFrameScrollFrame"]) |
||
190 | |||
191 | self:applySkin(_G["KeyBindingFrame"]) |
||
192 | |||
193 | end |
||
194 | |||
195 | function oSkin:makeModelFramesRotatable() |
||
196 | --[[ |
||
197 | [12:55:21] <dreyruugr> http://ace.pastey.net/551 |
||
198 | [12:55:42] <dreyruugr> That should do framerate independant rotation of the model, based on how much the mouse moves |
||
199 | [13:12:43] <dreyruugr> Gngsk: http://ace.pastey.net/552 - This doesn't work quite right, but if you work on it you'll be able to zoom in on the character's face using the y offset of the mouse |
||
200 | |||
201 | This does the trick, but it might be worth stealing chester's code from SuperInspect |
||
202 | |||
203 | ]] |
||
204 | |||
205 | -- Click to drag Modelframes |
||
206 | |||
207 | self:Hook("Model_RotateLeft") |
||
208 | self:Hook("Model_RotateRight") |
||
209 | self:makeMFRotatable(_G["CharacterModelFrame"]) |
||
210 | self:makeMFRotatable(_G["PetModelFrame"]) |
||
211 | self:makeMFRotatable(_G["DressUpModel"]) |
||
212 | self:makeMFRotatable(_G["PetStableModel"]) |
||
213 | |||
214 | end |
||
215 | |||
216 | function oSkin:makeMFRotatable(frame) |
||
217 | --frame:EnableMouseWheel(true) |
||
218 | frame:EnableMouse(true) |
||
219 | frame.draggingDirection = nil |
||
220 | frame.cursorPosition = { } |
||
221 | |||
222 | frame:SetScript("OnUpdate", function() |
||
223 | if this.dragging then |
||
224 | local x,y = GetCursorPosition() |
||
225 | if this.cursorPosition.x > x then |
||
226 | Model_RotateLeft(frame, (this.cursorPosition.x - x) * arg1) |
||
227 | elseif this.cursorPosition.x < x then |
||
228 | Model_RotateRight(frame, (x - this.cursorPosition.x) * arg1) |
||
229 | end |
||
230 | |||
231 | this.cursorPosition.x, this.cursorPosition.y = GetCursorPosition() |
||
232 | end |
||
233 | end) |
||
234 | |||
235 | frame:SetScript("OnMouseDown", function() |
||
236 | if arg1 == "LeftButton" then |
||
237 | this.dragging = true |
||
238 | this.cursorPosition.x, this.cursorPosition.y = GetCursorPosition() |
||
239 | end |
||
240 | end) |
||
241 | |||
242 | frame:SetScript("OnMouseUp", function() |
||
243 | if this.dragging then |
||
244 | this.dragging = false |
||
245 | this.cursorPosition.x, this.cursorPosition.y = nil |
||
246 | end |
||
247 | end) |
||
248 | |||
249 | --[[ MouseWheel to zoom Modelframe - in/out works, but needs to be fleshed out |
||
250 | frame:SetScript("OnMouseWheel", function() |
||
251 | local xPos, yPos, zPos = frame:GetPosition() |
||
252 | if arg1 == 1 then |
||
253 | frame:SetPosition(xPos+00.1, 0, 0) |
||
254 | else |
||
255 | frame:SetPosition(xPos-00.1, 0, 0) |
||
256 | end |
||
257 | end) ]] |
||
258 | end |
||
259 | |||
260 | function oSkin:Model_RotateLeft(model, rotationIncrement) |
||
261 | if ( not rotationIncrement ) then |
||
262 | rotationIncrement = 0.03 |
||
263 | end |
||
264 | model.rotation = model.rotation - rotationIncrement |
||
265 | model:SetRotation(model.rotation) |
||
266 | --PlaySound("igInventoryRotateCharacter") |
||
267 | end |
||
268 | |||
269 | function oSkin:Model_RotateRight(model, rotationIncrement) |
||
270 | if ( not rotationIncrement ) then |
||
271 | rotationIncrement = 0.03 |
||
272 | end |
||
273 | model.rotation = model.rotation + rotationIncrement |
||
274 | model:SetRotation(model.rotation) |
||
275 | --PlaySound("igInventoryRotateCharacter") |
||
276 | end |
||
277 | |||
278 | function oSkin:BankFrame() |
||
279 | if not self.db.profile.BankFrame or self.initialized.BankFrame then return end |
||
280 | self.initialized.BankFrame = true |
||
281 | |||
282 | self:removeRegions(_G["BankFrame"], {1, 2}) -- N.B. regions 3-5 are text |
||
283 | |||
284 | _G["BankFrame"]:SetWidth(_G["BankFrame"]:GetWidth() * FxMult) |
||
285 | _G["BankFrame"]:SetHeight(_G["BankFrame"]:GetHeight() * FyMult) |
||
286 | |||
287 | self:moveObject(_G["BankFrameTitleText"], nil, nil, "-", 35) |
||
288 | self:moveObject(_G["BankCloseButton"], "+", 28, "+", 6) |
||
289 | self:moveObject(_G["BankFrameItem1"], "-", 10, nil, nil) |
||
290 | |||
291 | for i,v in ipairs({ _G["BankFrame"]:GetRegions() }) do |
||
292 | -- regions 4 and 5 hold the slot text |
||
293 | if i == 4 or i == 5 then |
||
294 | self:moveObject(v, "+", 10, "-", 40) |
||
295 | end |
||
296 | end |
||
297 | |||
298 | self:moveObject(_G["BankFramePurchaseInfo"], nil, nil, "-", 40) |
||
299 | self:moveObject(_G["BankFrameMoneyFrame"], nil, nil, "_", 90) |
||
300 | |||
301 | self:applySkin(_G["BankFrame"]) |
||
302 | |||
303 | end |
||
304 | |||
305 | function oSkin:MailFrame() |
||
306 | if not self.db.profile.MailFrame or self.initialized.MailFrame then return end |
||
307 | self.initialized.MailFrame = true |
||
308 | |||
309 | self:Hook("OpenMail_Update", function() |
||
310 | self:Debug("OpenMail_Update") |
||
311 | self.hooks.OpenMail_Update() |
||
312 | self:moveObject(_G["OpenMailAttachmentText"], nil, nil, "-", 70) |
||
313 | end) |
||
314 | |||
315 | self:removeRegions(_G["MailFrame"]) |
||
316 | _G["MailFrame"]:SetWidth(_G["MailFrame"]:GetWidth() * FxMult) |
||
317 | _G["MailFrame"]:SetHeight(_G["MailFrame"]:GetHeight() * FyMult) |
||
318 | |||
319 | self:moveObject(_G["InboxCloseButton"], "+", 28, "+", 8) |
||
320 | |||
321 | -->>-- Inbox Frame |
||
322 | self:moveObject(_G["InboxTitleText"], "-", 15, "+", 6) |
||
323 | self:moveObject(_G["InboxCurrentPage"], nil, nil, "+", 12) |
||
324 | |||
325 | for i = 1, 7 do |
||
326 | self:removeRegions(_G["MailItem"..i], {2, 3}) -- N.B. regions 1, 4 & 5 are text |
||
327 | end |
||
328 | |||
329 | local xOfs, yOfs = 5, 20 |
||
330 | self:moveObject(_G["MailItem1"], "-", xOfs, "+", yOfs) |
||
331 | self:moveObject(_G["InboxPrevPageButton"], "-", xOfs, "+", yOfs / 2) |
||
332 | self:moveObject(_G["InboxNextPageButton"], "-", xOfs, "+", yOfs / 2) |
||
333 | |||
334 | -->>-- Send Mail Frame |
||
335 | local xOfs, yOfs = 5, 10 |
||
336 | self:removeRegions(_G["SendMailFrame"], {4, 5}) -- N.B. regions 1, 2 & 3 are text |
||
337 | self:moveObject(_G["SendMailTitleText"], "-", 15, "+", 6) |
||
338 | self:removeRegions(_G["SendMailScrollFrame"], {3, 4}) -- N.B. regions 1 & 2 are the background |
||
339 | for _, v in { _G["SendMailScrollFrame"], _G["SendMailNameEditBox"], _G["SendMailCostMoneyFrame"], |
||
340 | _G["SendMailPackageButton"], _G["SendMailMoneyFrame"], _G["SendMailCancelButton"] } do |
||
341 | self:moveObject(v, "-", xOfs, "+", yOfs) |
||
342 | end |
||
343 | self:skinScrollBar(_G["SendMailScrollFrame"]) |
||
344 | |||
345 | -->>-- Open Mail Frame |
||
346 | self:keepRegions(_G["OpenMailFrame"], {6, 7, 8, 9, 10, 11}) -- N.B. regions 6 - 11 are text |
||
347 | _G["OpenMailFrame"]:SetWidth(_G["OpenMailFrame"]:GetWidth() * FxMult) |
||
348 | _G["OpenMailFrame"]:SetHeight(_G["OpenMailFrame"]:GetHeight() * FyMult) |
||
349 | |||
350 | self:moveObject(_G["OpenMailCloseButton"], "+", 28, "+", 8) |
||
351 | |||
352 | self:moveObject(_G["OpenMailTitleText"], nil, nil, "-", 30) |
||
353 | self:moveObject(_G["OpenMailSenderLabel"], "-", 5, "+", 10) |
||
354 | self:moveObject(_G["OpenMailSubjectLabel"], "-", 5, "+", 10) |
||
355 | self:moveObject(_G["OpenMailScrollFrame"], "-", 5, "+", 10) |
||
356 | self:removeRegions(_G["OpenMailScrollFrame"], {1, 2}) -- N.B. regions 3 & 4 are the background |
||
357 | self:skinScrollBar(_G["OpenMailScrollFrame"]) |
||
358 | |||
359 | self:moveObject(_G["OpenMailCancelButton"], "+", 30, "-", 72) |
||
360 | |||
361 | self:applySkin(_G["OpenMailFrame"]) |
||
362 | |||
363 | -->>-- FrameTabs |
||
364 | for i = 1, 2 do |
||
365 | self:keepRegions(_G["MailFrameTab"..i], {7, 8}) -- N.B. region 7 is text, 8 is highlight |
||
366 | if i == 1 then |
||
367 | self:moveObject(_G["MailFrameTab"..i], nil, nil, "-", 70) |
||
368 | else |
||
369 | self:moveObject(_G["MailFrameTab"..i], "+", 4, nil, nil) |
||
370 | end |
||
371 | self:applySkin(_G["MailFrameTab"..i]) |
||
372 | end |
||
373 | |||
374 | self:applySkin(_G["MailFrame"]) |
||
375 | |||
376 | end |
||
377 | |||
378 | function oSkin:AuctionFrame() |
||
379 | if not self.db.profile.AuctionFrame or self.initialized.AuctionFrame then return end |
||
380 | self.initialized.AuctionFrame = true |
||
381 | |||
382 | self:Hook("FilterButton_SetType") |
||
383 | self:hookDDScript(BrowseDropDownButton) |
||
384 | |||
385 | -->>-- All Tabs |
||
386 | self:removeRegions(_G["AuctionFrame"]) |
||
387 | _G["AuctionFrame"]:SetHeight(_G["AuctionFrame"]:GetHeight() - 6) |
||
388 | |||
389 | self:moveObject(_G["AuctionFrameCloseButton"], "-", 4, "+", 8) |
||
390 | |||
391 | for i = 1, 3 do |
||
392 | self:keepRegions(_G["AuctionFrameTab"..i], {7, 8}) -- N.B. region 7 is the Text, 8 is the highlight |
||
393 | if i == 1 then |
||
394 | self:moveObject(_G["AuctionFrameTab"..i], nil, nil, "-", 4) |
||
395 | else |
||
396 | self:moveObject(_G["AuctionFrameTab"..i], "+", 3, nil, nil) |
||
397 | end |
||
398 | self:applySkin(_G["AuctionFrameTab"..i]) |
||
399 | |||
400 | end |
||
401 | |||
402 | self:moveObject(_G["AuctionFrameMoneyFrame"], nil, nil, "-", 6) |
||
403 | |||
404 | -->>-- Browse Frame |
||
405 | self:moveObject(_G["BrowseTitle"], nil, nil, "+", 6) |
||
406 | |||
407 | self:removeRegions(_G["BrowseFilterScrollFrame"]) |
||
408 | self:skinScrollBar(_G["BrowseFilterScrollFrame"]) |
||
409 | |||
410 | self:removeRegions(_G["BrowseScrollFrame"]) |
||
411 | self:skinScrollBar(_G["BrowseScrollFrame"]) |
||
412 | |||
413 | for i=1,15 do |
||
414 | self:removeRegions(_G["AuctionFilterButton"..i], {1, 2}) |
||
415 | self:applySkin(_G["AuctionFilterButton"..i]) |
||
416 | end |
||
417 | |||
418 | self:removeRegions(_G["BrowseDropDown"], {1, 2, 3}) -- N.B. region 4 is text |
||
419 | self:moveObject(_G["BrowseDropDownName"], "+", 40, nil, nil) |
||
420 | |||
421 | for _,v in {_G["BrowseQualitySort"], _G["BrowseLevelSort"], _G["BrowseDurationSort"], |
||
422 | _G["BrowseHighBidderSort"], _G["BrowseCurrentBidSort"] } do |
||
423 | self:removeRegions(v, {1, 2, 3}) |
||
424 | self:applySkin(v) |
||
425 | end |
||
426 | |||
427 | |||
428 | -->>-- Bid Frame |
||
429 | self:moveObject(_G["BidTitle"], nil, nil, "+", 6) |
||
430 | |||
431 | self:removeRegions(_G["BidScrollFrame"]) |
||
432 | self:skinScrollBar(_G["BidScrollFrame"]) |
||
433 | |||
434 | for _,v in {_G["BidQualitySort"],_G["BidLevelSort"], _G["BidDurationSort"], _G["BidBuyoutSort"], |
||
435 | _G["BidStatusSort"], _G["BidBidSort"],} do |
||
436 | self:removeRegions(v, {1, 2, 3}) |
||
437 | self:applySkin(v) |
||
438 | end |
||
439 | |||
440 | |||
441 | -->>-- Auctions Frame |
||
442 | self:moveObject(_G["AuctionsTitle"], nil, nil, "+", 6) |
||
443 | |||
444 | _G["AuctionsItemButton"]:SetWidth(_G["AuctionsItemButton"]:GetWidth() + 10) |
||
445 | _G["AuctionsItemButton"]:SetHeight(_G["AuctionsItemButton"]:GetHeight() + 10) |
||
446 | self:applySkin(_G["AuctionsItemButton"]) |
||
447 | |||
448 | self:removeRegions(_G["AuctionsScrollFrame"]) |
||
449 | self:skinScrollBar(_G["AuctionsScrollFrame"]) |
||
450 | |||
451 | for _,v in {_G["AuctionsQualitySort"], _G["AuctionsDurationSort"], _G["AuctionsHighBidderSort"], |
||
452 | _G["AuctionsBidSort"] } do |
||
453 | self:removeRegions(v, {1, 2, 3}) |
||
454 | self:applySkin(v) |
||
455 | end |
||
456 | |||
457 | self:applySkin(_G["AuctionFrame"]) |
||
458 | |||
459 | -->>-- AuctionDressUpFrame |
||
460 | |||
461 | self:removeRegions(_G["AuctionDressUpFrame"], {1, 2}) --N.B. regions 3 & 4 are the background |
||
462 | _G["AuctionDressUpFrame"]:SetWidth(_G["AuctionDressUpFrame"]:GetWidth() - 6) |
||
463 | _G["AuctionDressUpFrame"]:SetHeight(_G["AuctionDressUpFrame"]:GetHeight() - 13) |
||
464 | self:moveObject(_G["AuctionDressUpBackgroundTop"], nil, nil, "+", 8) |
||
465 | |||
466 | _G["AuctionDressUpModelRotateLeftButton"]:Hide() |
||
467 | _G["AuctionDressUpModelRotateRightButton"]:Hide() |
||
468 | |||
469 | self:removeRegions(_G["AuctionDressUpFrameCloseButton"], {2, 3, 4}) -- N.B. region 1 is the button artwork |
||
470 | |||
471 | self:applySkin(_G["AuctionDressUpFrame"]) |
||
472 | |||
473 | end |
||
474 | |||
475 | function oSkin:FilterButton_SetType(button, type, text, isLast) |
||
476 | |||
477 | local normalText = getglobal(button:GetName().."NormalText") |
||
478 | local normalTexture = getglobal(button:GetName().."NormalTexture") |
||
479 | local line = getglobal(button:GetName().."Lines") |
||
480 | |||
481 | if ( type == "class" ) then |
||
482 | button:SetText(text) |
||
483 | normalText:SetPoint("LEFT", button, "LEFT", 4, 0) |
||
484 | --normalTexture:SetAlpha(1.0) |
||
485 | line:Hide() |
||
486 | elseif ( type == "subclass" ) then |
||
487 | button:SetText(HIGHLIGHT_FONT_COLOR_CODE..text..FONT_COLOR_CODE_CLOSE) |
||
488 | --button:SetText("|cff007FFF"..text.."|r") |
||
489 | normalText:SetPoint("LEFT", button, "LEFT", 12, 0) |
||
490 | --normalTexture:SetAlpha(0.4) |
||
491 | line:Hide() |
||
492 | elseif ( type == "invtype" ) then |
||
493 | button:SetText(HIGHLIGHT_FONT_COLOR_CODE..text..FONT_COLOR_CODE_CLOSE) |
||
494 | normalText:SetPoint("LEFT", button, "LEFT", 20, 0) |
||
495 | normalTexture:SetAlpha(0.0) |
||
496 | if ( isLast ) then |
||
497 | line:SetTexCoord(0.4375, 0.875, 0, 0.625) |
||
498 | else |
||
499 | line:SetTexCoord(0, 0.4375, 0, 0.625) |
||
500 | end |
||
501 | line:Show() |
||
502 | end |
||
503 | |||
504 | button.type = type |
||
505 | |||
506 | end |