@@ -111,6 +111,39 @@ local function QuestLogQuests()
111
111
end
112
112
end
113
113
114
+ local function EventsFrameEvents (...)
115
+ local _ , element , elementData , new
116
+ local r , g , b = unpack (E .media .rgbvaluecolor )
117
+
118
+ if _G .select (" #" , ... ) == 2 then
119
+ element , elementData = ...
120
+ elseif _G .select (" #" , ... ) == 3 then
121
+ element , elementData , new = ...
122
+ else
123
+ _ , element , elementData , new = ...
124
+ end
125
+
126
+ if new ~= false then
127
+ if elementData .data .entryType == 1 then -- OngoingHeader
128
+ element .Background :StripTextures ()
129
+ element .Background :CreateBackdrop (' Transparent' )
130
+ elseif elementData .data .entryType == 2 then -- OngoingEvent
131
+ element .Background :SetAlpha (0 )
132
+ elseif elementData .data .entryType == 3 then -- ScheduledHeader
133
+ element .Background :StripTextures ()
134
+ element .Background :CreateBackdrop (' Transparent' )
135
+ elseif elementData .data .entryType == 4 then -- ScheduledEvent
136
+ _G .nop ()
137
+ elseif elementData .data .entryType == 5 then -- Date
138
+ _G .nop ()
139
+ elseif elementData .data .entryType == 6 then -- HiddenEventsLabel
140
+ _G .nop ()
141
+ elseif elementData .data .entryType == 7 then -- NoEventsLabel
142
+ _G .nop ()
143
+ end
144
+ end
145
+ end
146
+
114
147
-- The original script here would taint the Quest Objective Tracker Button, so swapping to our own ~Simpy
115
148
function S :WorldMap_QuestMapHide ()
116
149
local QuestModelScene = _G .QuestModelScene
@@ -309,6 +342,9 @@ function S:WorldMapFrame()
309
342
EventsFrameScrollBox :SetTemplate ()
310
343
311
344
S :HandleTrimScrollBar (EventsFrame .ScrollBar )
345
+
346
+ -- Blizz new function for AddOns to access items on a ScrollBox. See Interface\AddOns\Blizzard_SharedXML\Shared\Scroll\ScrollUtil.lua
347
+ _G .ScrollUtil .AddAcquiredFrameCallback (EventsFrameScrollBox , EventsFrameEvents , self , true )
312
348
end
313
349
end
314
350
0 commit comments