refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-05 07:24:13 +02:00
parent 91aa71685f
commit ff4ce0d288
5 changed files with 125 additions and 106 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ do
end
function color_accessor(callback)
return function()
return index_function({callback=callback, table=COLORS}, index_handler)
return index_function(__(tt) :callback(callback) :table(COLORS), index_handler)
end
end
end
@@ -51,7 +51,7 @@ do
}
public.color.get = color_accessor(function(color)
local r, g, b, a = unpack(color)
return setmetatable({r/255, g/255, b/255, a}, mt)
return setmetatable(A(r/255, g/255, b/255, a), mt)
end)
end