big refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-21 18:13:37 +02:00
parent 568c0fb353
commit 0fd05a0ba8
9 changed files with 46 additions and 60 deletions
+9 -13
View File
@@ -60,24 +60,20 @@ do
end
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),
}
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.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),
}
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
public.name{get=function() id = id + 1; return 'aux_frame'..id end}
function public.name.get() id = id + 1; return 'aux_frame'..id end
end
do