big refactoring
This commit is contained in:
@@ -60,23 +60,24 @@ do
|
||||
end
|
||||
end
|
||||
}
|
||||
public.accessor.color = color_accessor(function(color)
|
||||
local r, g, b, a = unpack(color)
|
||||
return setmetatable({r/255, g/255, b/255, a}, mt)
|
||||
end)
|
||||
public.color{
|
||||
get = color_accessor(function(color)
|
||||
local r, g, b, a = unpack(color)
|
||||
return setmetatable({r/255, g/255, b/255, a}, mt)
|
||||
end),
|
||||
}
|
||||
end
|
||||
|
||||
public.accessor.inline_color = color_accessor(function(color)
|
||||
local r, g, b, a = unpack(color)
|
||||
return format('|c%02X%02X%02X%02X', a, r, g, b)
|
||||
end)
|
||||
public.inline_color{
|
||||
get = color_accessor(function(color)
|
||||
local r, g, b, a = unpack(color)
|
||||
return format('|c%02X%02X%02X%02X', a, r, g, b)
|
||||
end),
|
||||
}
|
||||
|
||||
do
|
||||
local id = 0
|
||||
function public.accessor.name()
|
||||
id = id + 1
|
||||
return 'aux_frame'..id
|
||||
end
|
||||
public.name{get=function() id = id + 1; return 'aux_frame'..id end}
|
||||
end
|
||||
|
||||
do
|
||||
|
||||
Reference in New Issue
Block a user