from retail
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local AddonName, Private = ...
|
||||
|
||||
local internalVersion = 79
|
||||
local internalVersion = 80
|
||||
|
||||
-- Lua APIs
|
||||
local insert = table.insert
|
||||
@@ -518,7 +518,7 @@ function Private.RegisterRegionOptions(name, createFunction, icon, displayName,
|
||||
end
|
||||
end
|
||||
|
||||
function WeakAuras.RegisterSubRegionOptions(name, createFunction, description)
|
||||
function WeakAuras.RegisterSubRegionOptions(name, createFunction, description, getAnchors)
|
||||
if not(name) then
|
||||
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - name is not defined", 2);
|
||||
elseif(type(name) ~= "string") then
|
||||
@@ -527,11 +527,14 @@ function WeakAuras.RegisterSubRegionOptions(name, createFunction, description)
|
||||
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - creation function is not defined", 2);
|
||||
elseif(type(createFunction) ~= "function") then
|
||||
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - creation function is not a function", 2);
|
||||
elseif(getAnchors and type(getAnchors) ~= "function") then
|
||||
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - getAnchors function is not a function", 2);
|
||||
elseif(subRegionOptions[name]) then
|
||||
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - region type \""..name.."\" already defined", 2);
|
||||
else
|
||||
subRegionOptions[name] = {
|
||||
create = createFunction,
|
||||
getAnchors = getAnchors,
|
||||
description = description,
|
||||
};
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user