Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local DHMM
- local Ignore
- local MicroMenu = {
- AchievementMicroButton,
- CharacterBag0Slot,
- CharacterBag1Slot,
- CharacterBag2Slot,
- CharacterBag3Slot,
- CharacterMicroButton,
- CollectionsMicroButton,
- EJMicroButton,
- GuildMicroButton,
- LFDMicroButton,
- MainMenuBarBackpackButton,
- MainMenuMicroButton,
- MicroButtonAndBagsBar,
- QuestLogMicroButton,
- SpellbookMicroButton,
- StoreMicroButton,
- TalentMicroButton,
- }
- local function SetAlpha(Frame)
- if Ignore then return end
- Ignore = true
- if Frame:IsMouseOver() then
- Frame:SetAlpha(1)
- else
- Frame:SetAlpha(0)
- end
- Ignore = nil
- end
- local function HideMicroMenu()
- Ignore = true
- for _, Frame in pairs(MicroMenu) do
- Frame:SetAlpha(0)
- end
- Ignore = nil
- end
- local function OnEnter()
- if DHMM then DHMM:Cancel() end
- Ignore = true
- for _, Frame in pairs(MicroMenu) do
- Frame:SetAlpha(1)
- end
- Ignore = nil
- end
- local function OnLeave()
- DHMM = C_Timer.NewTimer(.5, HideMicroMenu)
- end
- local function SetupHooks(Frame)
- Frame:HookScript("OnEnter", OnEnter)
- Frame:HookScript("OnLeave", OnLeave)
- end
- for _, Frame in pairs(MicroMenu) do
- hooksecurefunc(Frame, "SetAlpha", SetAlpha)
- SetupHooks(Frame)
- Frame:SetAlpha(0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement