/trunk/pStats
):SetPoint('TOPLEFT', sub, 'BOTTOMLEFT', 0, -76) |
end |
function MiniMapTracking:PLAYER_ENTERING_WORLD(event) |
local function OnEvent(self, event) |
local db = pStatsDB or {colors = {0, 1, 1}, sorted = true} |
LibStub('LibSimpleOptions-1.0').AddOptionsPanel('pStats', function(self) CreateOptions(self, db) end) |
self:UnregisterEvent(event) |
pStatsDB = db |
end |
if(select(4, GetBuildInfo()) >= 3e4) then |
MiniMapTrackingButton:EnableMouseWheel(true) |
MiniMapTrackingButton:RegisterForClicks('AnyUp') |
MiniMapTrackingButton:RegisterEvent('PLAYER_ENTERING_WORLD') |
MiniMapTrackingButton:SetScript('OnEvent', function(self, event, ...) self[event](self, event, ...) end) |
MiniMapTrackingButton:SetScript('OnMouseWheel', OnMouseWheel) |
MiniMapTrackingButton:SetScript('OnClick', OnClick) |
MiniMapTrackingButton:SetScript('OnEnter', OnEnter) |
end) |
else |
MiniMapTracking:EnableMouseWheel(true) |
MiniMapTracking:RegisterEvent('PLAYER_ENTERING_WORLD') |
MiniMapTracking:SetScript('OnEvent', function(self, event, ...) self[event](self, event, ...) end) |
MiniMapTracking:SetScript('OnMouseWheel', OnMouseWheel) |
MiniMapTracking:SetScript('OnMouseUp', OnClick) |
MiniMapTracking:SetScript('OnEnter', OnEnter) |