View Single Post
08-10-19, 10:06 AM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,871
Lua Code:
  1. WorldMapFrame.BlackoutFrame.Blackout:SetAlpha(0)
  2.  
  3. WorldMapFrame.ScrollContainer.GetCursorPosition = function(f)
  4.     local x,y = MapCanvasScrollControllerMixin.GetCursorPosition(f);
  5.     local s = WorldMapFrame:GetScale();
  6.     return x/s, y/s;
  7. end
  8.  
  9. local function SimpleMapCommands(msg, editbox)
  10.   if msg == 'off' then
  11.     print('SimpleMap fade has been turned off.')
  12.     PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, 1, 3.0, .5)
  13.     SimpleMap = 3
  14.   elseif msg == 'on' then
  15.     print("SimpleMap fade has been turned on.")
  16.     PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, .3, 3.0, .5)
  17.     SimpleMap = 1
  18.   end
  19. end
  20.  
  21.  
  22. SLASH_SMFADE1 = '/smfade'
  23.  
  24. SlashCmdList["SMFADE"] = SimpleMapCommands
  25.  
  26. local f = Createframe("Frame")
  27. f:SetScript("OnEvent", function(self, event, ...)
  28.     if SimpleMap == 1 then
  29.         PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, .3, 3.0, .5)
  30.     elseif SimpleMap == 3 then
  31.         PlayerMovementFrameFader.AddDeferredFrame(WorldMapFrame, 1, 3.0, .5)
  32.     end
  33. end)
  34. f:RegisterEvent("PLAYER_LOGIN")
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 08-10-19 at 11:27 AM.
  Reply With Quote