View Single Post
10-13-16, 02:07 PM   #2
tonyis3l33t
A Cyclonian
 
tonyis3l33t's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 47
event PLAYER_STOPPED_MOVING combined with the command to hide all the ui, UIParent:Hide()

Code:
local addonName, addonTable = ... ;
local addon = CreateFrame("Frame");

addon:RegisterEvent("PLAYER_STOPPED_MOVING");
addon:RegisterEvent("PLAYER_STARTED_MOVING");

addon:SetScript("OnEvent", function(self, event, ...) 

	if event == "PLAYER_STOPPED_MOVING" then
		UIParent:Hide();
         end;
	if event == "PLAYER_STARTED_MOVING" then
		UIParent:Show();
         end;
end);
  Reply With Quote