SHARE
TWEET

Untitled

a guest Aug 20th, 2019 130 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. assert(LoadAddOn("Blizzard_TimeManager"))
  2.  
  3. local DHMB
  4.  
  5. local MinimapButtons = {
  6.     GameTimeFrame,
  7.     GarrisonLandingPageMinimapButton,
  8.     GuildInstanceDifficulty,
  9.     MiniMapChallengeMode,
  10.     MiniMapInstanceDifficulty,
  11.     MiniMapTracking,
  12.     MiniMapTrackingButton,
  13.     MiniMapWorldMapButton,
  14.     MinimapZoneTextButton,
  15.     MinimapZoomIn,
  16.     MinimapZoomOut,
  17.     QueueStatusMinimapButton,
  18.     TimeManagerClockButton,
  19. }
  20.  
  21. local function StopAnim()
  22.     GarrisonLandingPageMinimapButton.MinimapLoopPulseAnim:Stop()
  23. end
  24.  
  25. local function HideMinimapButtons()
  26.     for _, Frame in pairs(MinimapButtons) do
  27.         Frame:SetAlpha(0)
  28.     end
  29.     MinimapBorderTop:SetAlpha(0)
  30. end
  31.  
  32. local function OnEnter()
  33.     if DHMB then DHMB:Cancel() end
  34.     StopAnim()
  35.     for _, Frame in pairs(MinimapButtons) do
  36.         Frame:SetAlpha(1)
  37.     end
  38.     MinimapBorderTop:SetAlpha(1)
  39. end
  40.  
  41. local function OnLeave()
  42.     DHMB = C_Timer.NewTimer(.5, HideMinimapButtons)
  43. end
  44.  
  45. local function SetupHooks(Frame)
  46.     Frame:HookScript("OnEnter", OnEnter)
  47.     Frame:HookScript("OnLeave", OnLeave)
  48. end
  49.  
  50. for _, Frame in pairs(MinimapButtons) do
  51.     SetupHooks(Frame)
  52.     Frame:SetAlpha(0)
  53. end
  54.  
  55. SetupHooks(Minimap)
  56. SetupHooks(MiniMapMailFrame)
  57. MinimapBorderTop:SetAlpha(0)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top