Lua Code:
WorldMapFrame.BlackoutFrame.Blackout:SetAlpha(0)
WorldMapFrame.ScrollContainer.GetCursorPosition = function(f)
local x,y = MapCanvasScrollControllerMixin.GetCursorPosition(f);
local s = WorldMapFrame:GetScale();
return x/s, y/s;
end
local function SimpleMapCommands(msg, editbox)
if msg == 'off' then
print('SimpleMap fade has been turned off.')
PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, 1, 3.0, .5)
SimpleMap = 3
elseif msg == 'on' then
print("SimpleMap fade has been turned on.")
PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, .3, 3.0, .5)
SimpleMap = 1
end
end
SLASH_SMFADE1 = '/smfade'
SlashCmdList["SMFADE"] = SimpleMapCommands
local f = Createframe("Frame")
f:SetScript("OnEvent", function(self, event, ...)
if SimpleMap == 1 then
PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, .3, 3.0, .5)
elseif SimpleMap == 3 then
PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, 1, 3.0, .5)
end
end)
f:RegisterEvent("PLAYER_LOGIN")