Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@GabeStah
Created March 30, 2015 01:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GabeStah/95d776f80284219b584d to your computer and use it in GitHub Desktop.
Save GabeStah/95d776f80284219b584d to your computer and use it in GitHub Desktop.
-- Change the name to the name of the WeakAura
local name = "A Test Group"
local GetRegion = function(name)
local DisplayType = function(name)
if WeakAuras then
if WeakAuras.auras and WeakAuras.auras[name] then return 'auras' end
if WeakAuras.regions and WeakAuras.regions[name] then return 'regions' end
end
end
local displayType = DisplayType(name)
if not displayType then return end
if displayType == 'auras' then
if WeakAuras
and WeakAuras[displayType]
and WeakAuras[displayType][name]
and WeakAuras[displayType][name][0]
and WeakAuras[displayType][name][0]['region'] then
return WeakAuras[displayType][name][0]['region']
end
elseif displayType == 'regions' then
if WeakAuras
and WeakAuras[displayType]
and WeakAuras[displayType][name]
and WeakAuras[displayType][name]
and WeakAuras[displayType][name]['region'] then
return WeakAuras[displayType][name]['region']
end
end
end
local region = GetRegion(name)
if not region then return end
local location, relativeTo, relativePoint, x, y = region:GetPoint(1)
region:SetPoint(location, relativeTo, relativePoint, x, y+150)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment