From bbc5d3e58647b30346357745ff4f8421d4214a19 Mon Sep 17 00:00:00 2001 From: Ryan Ward Date: Thu, 10 Feb 2022 22:39:40 -0500 Subject: [PATCH] Objects are drawn --- OldStuff/GuiManager/Core/Colors.int | 1680 --------------------------- gui/colors.lua | 1680 +++++++++++++++++++++++++++ gui/init.lua | 65 +- 3 files changed, 1717 insertions(+), 1708 deletions(-) delete mode 100644 OldStuff/GuiManager/Core/Colors.int create mode 100644 gui/colors.lua diff --git a/OldStuff/GuiManager/Core/Colors.int b/OldStuff/GuiManager/Core/Colors.int deleted file mode 100644 index eda5f1e..0000000 --- a/OldStuff/GuiManager/Core/Colors.int +++ /dev/null @@ -1,1680 +0,0 @@ -local function HSL(h, s, l, a) - if s<=0 then return l,l,l,a end - h, s, l = h/256*6, s/255, l/255 - local c = (1-math.abs(2*l-1))*s - local x = (1-math.abs(h%2-1))*c - local m,r,b,g = (l-.5*c), 0,0,0 - if h < 1 then r,b,g = c,x,0 - elseif h < 2 then r,b,g = x,c,0 - elseif h < 3 then r,b,g = 0,c,x - elseif h < 4 then r,b,g = 0,x,c - elseif h < 5 then r,b,g = x,0,c - else r,b,g = c,0,x - end return (r+m)*255,(g+m)*255,(b+m)*255,a -end -Color={ -new=function(r,b,g) - mt = { - __add = function (c1,c2) - return Color.new(c1[1]+c2[1],c1[2]+c2[2],c1[2]+c2[2]) - end, - __sub = function (c1,c2) - return Color.new(c1[1]-c2[1],c1[2]-c2[2],c1[2]-c2[2]) - end, - __mul = function (c1,c2) - return Color.new(c1[1]*c2[1],c1[2]*c2[2],c1[2]*c2[2]) - end, - __div = function (c1,c2) - return Color.new(c1[1]/c2[1],c1[2]/c2[2],c1[2]/c2[2]) - end, - __mod = function (c1,c2) - return Color.new(c1[1]%c2[1],c1[2]%c2[2],c1[2]%c2[2]) - end, - __pow = function (c1,c2) - return Color.new(c1[1]^c2[1],c1[2]^c2[2],c1[2]^c2[2]) - end, - __unm = function (c1) - return Color.new(-c1[1],-c1[2],-c1[2]) - end, - __tostring = function(c) - return "("..c[1]..","..c[2]..","..c[3]..")" - end, - __eq = Color.EQ, - __lt = Color.LT, - __le = Color.LE, - } - local temp = {r/255,b/255,g/255,1} - setmetatable(temp, mt) - return temp -end, -Random=function() - return Color.new(math.random(0,255),math.random(0,255),math.random(0,255)) -end, -EQ = function (c1,c2) - return (c1[1]==c2[1] and c1[2]==c2[2] and c1[2]==c2[2]) -end, -LT = function (c1,c2) - return (c1[1]