i think thats the last time im modifying copy to clipboard

This commit is contained in:
jill 2021-09-19 20:13:46 +03:00
parent 8fc339ec63
commit 78dbca6c05

View file

@ -49,56 +49,66 @@ function self.createButtons()
if mode == modes.preview then
local e = ease.eases[dropdown.kselected('ease1')]
param1[1] = (slider.kvalue(e.name .. 'param11') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e.name .. 'param11'))
param1[2] = (slider.kvalue(e.name .. 'param12') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e.name .. 'param12'))
param1[1] = slider.kvalue(e.name .. 'param11')
param1[2] = slider.kvalue(e.name .. 'param12')
local p1 = ''
for i,v in ipairs(nillify(param1)) do
if param1[1] ~= (e.params[1] and e.params[1].default) or param1[2] ~= (e.params[2] and e.params[2].default) then
for i,v in ipairs(param1) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
end
s = e.name .. (p1 ~= '' and ('.params(' .. p1 .. ')') or '')
elseif mode == modes.mix then
local e1 = ease.eases[dropdown.kselected('ease1')]
local e2 = ease.eases[dropdown.kselected('ease2')]
param1[1] = (slider.kvalue(e1.name .. 'param11') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e1.name .. 'param11'))
param1[2] = (slider.kvalue(e1.name .. 'param12') ~= (e1.params[2] and e1.params[2].default) and slider.kvalue(e1.name .. 'param12'))
param2[1] = (slider.kvalue(e2.name .. 'param21') ~= (e2.params[1] and e2.params[1].default) and slider.kvalue(e2.name .. 'param11'))
param2[2] = (slider.kvalue(e2.name .. 'param22') ~= (e2.params[2] and e2.params[2].default) and slider.kvalue(e2.name .. 'param12'))
param1[1] = slider.kvalue(e1.name .. 'param11')
param1[2] = slider.kvalue(e1.name .. 'param12')
param2[1] = slider.kvalue(e2.name .. 'param11')
param2[2] = slider.kvalue(e2.name .. 'param12')
local p1 = ''
for i,v in ipairs(nillify(param1)) do
if param1[1] ~= (e1.params[1] and e1.params[1].default) or param1[2] ~= (e1.params[2] and e1.params[2].default) then
for i,v in ipairs(param1) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
end
local p2 = ''
for i,v in ipairs(nillify(param2)) do
if param2[1] ~= (e2.params[1] and e2.params[1].default) or param2[2] ~= (e2.params[2] and e2.params[2].default) then
for i,v in ipairs(param2) do
v = math.floor(v * 100) / 100
p2 = p2 .. (i > 1 and (', ' .. v) or v)
end
end
s = 'mixEase(' .. e1.name .. (p1 ~= '' and ('.params(' .. p1 .. ')') or '') .. ', ' .. e2.name .. (p2 ~= '' and ('.params(' .. p2 .. ')') or '') .. ', ' .. (math.floor(slider.kvalue('mix') * 100) / 100) .. ')'
elseif mode == modes.multiply then
local e1 = ease.eases[dropdown.kselected('ease1')]
local e2 = ease.eases[dropdown.kselected('ease2')]
param1[1] = (slider.kvalue(e1.name .. 'param11') ~= (e1.params[1] and e1.params[1].default) and slider.kvalue(e1.name .. 'param11'))
param1[2] = (slider.kvalue(e1.name .. 'param12') ~= (e1.params[2] and e1.params[2].default) and slider.kvalue(e1.name .. 'param12'))
param2[1] = (slider.kvalue(e2.name .. 'param21') ~= (e2.params[1] and e2.params[1].default) and slider.kvalue(e2.name .. 'param11'))
param2[2] = (slider.kvalue(e2.name .. 'param22') ~= (e2.params[2] and e2.params[2].default) and slider.kvalue(e2.name .. 'param12'))
param1[1] = slider.kvalue(e1.name .. 'param11')
param1[2] = slider.kvalue(e1.name .. 'param12')
param2[1] = slider.kvalue(e2.name .. 'param11')
param2[2] = slider.kvalue(e2.name .. 'param12')
local p1 = ''
for i,v in ipairs(nillify(param1)) do
if param1[1] ~= (e1.params[1] and e1.params[1].default) or param1[2] ~= (e1.params[2] and e1.params[2].default) then
for i,v in ipairs(param1) do
v = math.floor(v * 100) / 100
p1 = p1 .. (i > 1 and (', ' .. v) or v)
end
end
local p2 = ''
for i,v in ipairs(nillify(param2)) do
if param2[1] ~= (e2.params[1] and e2.params[1].default) or param2[2] ~= (e2.params[2] and e2.params[2].default) then
for i,v in ipairs(param2) do
v = math.floor(v * 100) / 100
p2 = p2 .. (i > 1 and (', ' .. v) or v)
end
end
s = 'function(x) ' .. e2.name .. (p2 ~= '' and ('.params(' .. p2 .. ')') or '') .. '(' .. e1.name .. (p1 ~= '' and ('.params(' .. p1 .. ')') or '') .. '(x)) end'
end