@@ -3,6 +3,7 @@ local S = E:GetModule('Skins')
3
3
local TT = E :GetModule (' Tooltip' )
4
4
5
5
local _G = _G
6
+ local next = next
6
7
local unpack = unpack
7
8
local hooksecurefunc = hooksecurefunc
8
9
@@ -179,6 +180,7 @@ function S:WorldMapFrame()
179
180
QuestScrollFrame .BorderFrame :SetAlpha (0 )
180
181
QuestScrollFrame .Background :SetAlpha (0 )
181
182
QuestScrollFrame .Contents .Separator :SetAlpha (0 )
183
+
182
184
QuestScrollFrame :SetTemplate ()
183
185
SkinHeaders (QuestScrollFrame .Contents .StoryHeader )
184
186
S :HandleEditBox (QuestScrollFrame .SearchBox )
@@ -258,54 +260,56 @@ function S:WorldMapFrame()
258
260
MapLegendScroll :SetTemplate ()
259
261
S :HandleTrimScrollBar (MapLegendScroll .ScrollBar )
260
262
261
- -- 11.1 Stuff
262
- local EventsFrame = QuestMapFrame .EventsFrame
263
- EventsFrame .TitleText :FontTemplate (nil , 16 )
264
- EventsFrame .BorderFrame :SetAlpha (0 )
265
-
266
- --[[
267
- TO DO: Fill the inlay with some love
268
- ]]
269
-
270
- local EventsFrameScroll = EventsFrame .ScrollBox
271
- EventsFrameScroll :StripTextures ()
272
- EventsFrameScroll :SetTemplate ()
273
- S :HandleTrimScrollBar (EventsFrame .ScrollBar )
274
-
275
- -- New Side Tabs
263
+ -- 11.1 New Side Tabs
276
264
local tabs = {
277
265
QuestMapFrame .QuestsTab ,
278
266
QuestMapFrame .EventsTab ,
279
267
QuestMapFrame .MapLegendTab
280
268
}
281
269
282
- for _ , tab in pairs (tabs ) do
283
- tab .Background :SetAlpha (0 )
270
+ for _ , tab in next , tabs do
284
271
tab :Size (34 , 44 )
285
-
286
272
tab :CreateBackdrop ()
287
273
tab .backdrop :Point (' TOPLEFT' , 2 , - 2 )
288
274
tab .backdrop :Point (' BOTTOMRIGHT' , - 2 , 2 )
289
275
290
- tab .SelectedTexture :SetDrawLayer (' ARTWORK' )
291
- tab .SelectedTexture :ClearAllPoints ()
292
- tab .SelectedTexture :SetPoint (' TOPLEFT' , 4 , - 4 )
293
- tab .SelectedTexture :SetPoint (' BOTTOMRIGHT' , - 4 , 4 )
294
- tab .SelectedTexture :SetColorTexture (1 , 0.82 , 0 , 0.3 )
295
-
296
- for _ , region in next , {tab :GetRegions ()} do
297
- if region :IsObjectType (' Texture' ) then
298
- if region :GetAtlas () == ' QuestLog-Tab-side-Glow-hover' then
299
- region :Point (' TOPLEFT' , 4 , - 4 )
300
- region :Point (' BOTTOMRIGHT' , - 4 , 4 )
301
- region :SetColorTexture (1 , 1 , 1 , 0.3 )
302
- end
276
+ if tab .Background then
277
+ tab .Background :SetAlpha (0 )
278
+ end
279
+
280
+ if tab .SelectedTexture then
281
+ tab .SelectedTexture :SetDrawLayer (' ARTWORK' )
282
+ tab .SelectedTexture :ClearAllPoints ()
283
+ tab .SelectedTexture :SetPoint (' TOPLEFT' , 4 , - 4 )
284
+ tab .SelectedTexture :SetPoint (' BOTTOMRIGHT' , - 4 , 4 )
285
+ tab .SelectedTexture :SetColorTexture (1 , 0.82 , 0 , 0.3 )
286
+ end
287
+
288
+ for _ , region in next , { tab :GetRegions () } do
289
+ if region :IsObjectType (' Texture' ) and region :GetAtlas () == ' QuestLog-Tab-side-Glow-hover' then
290
+ region :SetColorTexture (1 , 1 , 1 , 0.3 )
291
+ region :Point (' TOPLEFT' , 4 , - 4 )
292
+ region :Point (' BOTTOMRIGHT' , - 4 , 4 )
303
293
end
304
294
end
305
295
end
306
296
307
- QuestMapFrame .QuestsTab :ClearAllPoints ()
308
- QuestMapFrame .QuestsTab :Point (' TOPLEFT' , QuestMapFrame , ' TOPRIGHT' , 1 , 2 )
297
+ if QuestMapFrame .QuestsTab then
298
+ QuestMapFrame .QuestsTab :ClearAllPoints ()
299
+ QuestMapFrame .QuestsTab :Point (' TOPLEFT' , QuestMapFrame , ' TOPRIGHT' , 1 , 2 )
300
+ end
301
+
302
+ local EventsFrame = QuestMapFrame .EventsFrame
303
+ if EventsFrame then
304
+ EventsFrame .TitleText :FontTemplate (nil , 16 )
305
+ EventsFrame .BorderFrame :SetAlpha (0 )
306
+
307
+ local EventsFrameScrollBox = EventsFrame .ScrollBox
308
+ EventsFrameScrollBox :StripTextures ()
309
+ EventsFrameScrollBox :SetTemplate ()
310
+
311
+ S :HandleTrimScrollBar (EventsFrame .ScrollBar )
312
+ end
309
313
end
310
314
311
315
S :AddCallback (' WorldMapFrame' )
0 commit comments