|
_.options = options |
_.defaults = defaults |
|
-- this function is used to clone the default table for Dewdrop-2.0 to apply changes on it without breaking the Ace3 table. |
-- http://lua-users.org/wiki/CopyTable |
-- Changes to the table are committed in the ToggleDewdrop function |
local function deepcopy(object) |
local lookup_table = {} |
local function _copy(object) |
if type(object) ~= "table" then |
return object |
elseif lookup_table[object] then |
return lookup_table[object] |
end |
local new_table = {} |
lookup_table[object] = new_table |
for index, value in pairs(object) do |
new_table[_copy(index)] = _copy(value) |
end |
return setmetatable(new_table, getmetatable(object)) |
end |
return _copy(object) |
end |
|
_.DEW = {} |
_.DEW.options = deepcopy(options) |