Skip to content

Commit 441da26

Browse files
committed
Skin the Events Frame Tab on the World Map. Simpy, i have no clue what i'm doing. haaaalp
1 parent 16dd157 commit 441da26

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

ElvUI/Mainline/Modules/Skins/WorldMap.lua

+36
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,39 @@ local function QuestLogQuests()
111111
end
112112
end
113113

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+
114147
-- The original script here would taint the Quest Objective Tracker Button, so swapping to our own ~Simpy
115148
function S:WorldMap_QuestMapHide()
116149
local QuestModelScene = _G.QuestModelScene
@@ -309,6 +342,9 @@ function S:WorldMapFrame()
309342
EventsFrameScrollBox:SetTemplate()
310343

311344
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)
312348
end
313349
end
314350

0 commit comments

Comments
 (0)