local CMND = elements.allocate("SSCCSSCC", "CMND")
elements.element(elements.SSCCSSCC_PT_CMND, elements.element(elements.DEFAULT_PT_WIFI))
elements.property(elements.SSCCSSCC_PT_CMND, "Name", "CMND")
elements.property(elements.SSCCSSCC_PT_CMND, "MenuVisible", 0)
elements.property(elements.SSCCSSCC_PT_CMND, "Colour", 0xFF9900)
local CMND2 = elements.allocate("SSCCSSCC", "CMND2")
elements.element(elements.SSCCSSCC_PT_CMND2, elements.element(elements.DEFAULT_PT_WIFI))
elements.property(elements.SSCCSSCC_PT_CMND2, "Name", "CMDS")
elements.property(elements.SSCCSSCC_PT_CMND2, "Description", "Cmnd setup tool")
elements.property(elements.SSCCSSCC_PT_CMND2, "Colour", 0x00FFFF)
elements.property(elements.SSCCSSCC_PT_CMND2, "MenuSection", 11)
Elmn=tpt.element("CMDS")
function cmnd2(i,x,y,s,n)
local Main = Window:new(180,120,270,200)
--tpt.start_getPartIndex()
--while tpt.next_getPartIndex() do
for i in sim.parts() do
--local index = tpt.getPartIndex()
if tpt.get_property("type",i) == Elmn then
tpt.set_property("type","CMND",i)
interface.showWindow(Main)
end
end
local CloseButton = Button:new(10, 175, 60, 16, "Close")
CloseButton:action(function()
interface.closeWindow(Main)
tpt.set_property("type","none",x,y)
end)
Main:onTryExit(function()interface.closeWindow(Main) end)
Main:addComponent(CloseButton);
local Checkbox1 = Checkbox:new(85, 83, 30, 30, "Replace by coordinates")
local Button1 = Button:new(80, 0, 1, 200, "")
local Button2 = Button:new(10, 5, 60, 16, "Set type")
local Button3 = Button:new(10, 25, 60, 16, "Set temp")
local Button4 = Button:new(10, 45, 60, 16, "Set life")
local Button5 = Button:new(80, 45, 189, 1, "")
local Button6 = Button:new(90, 175, 170, 17, "Ok")
local Button7 = Button:new(10, 65, 60, 16, "Set tmp")
local Button8 = Button:new(10, 85, 60, 16, "Set tmp2")
local Button9 = Button:new(10, 105, 60, 16, "Set ctype")
local Button10 = Button:new(10, 125, 60, 16, "Other")
local Button11 = Button:new(90, 55, 80, 16, "Pause")
local Button12 = Button:new(90, 75, 80, 16, "Reset temp")
local Button13 = Button:new(90, 95, 80, 16, "Reset pressure")
local Button14 = Button:new(90, 115, 80, 16, "Set gravity")
local Button15 = Button:new(90, 135, 80, 16, "Reset sprk")
local Button16 = Button:new(90, 155, 80, 16, "Display mode")
local Button17 = Button:new(10, 145, 60, 16, "Create pix")
local TypeTextbox1 = Textbox:new(130, 50, 45, 16)
local TypeTextbox2 = Textbox:new(140, 65, 45, 16)
local TypeTextbox3 = Textbox:new(95, 47, 45, 16)
local TypeTextbox4 = Textbox:new(157, 47, 45, 16)
local Label1 = Label:new(120, 15, 60, 16, "")
local Label4 = Label:new(76, 50, 60, 16, "")
local Label5 = Label:new(78, 65, 60, 16, "Element 2 :")
local Label6 = Label:new(78, 45, 20, 20, "X:")
local Label7 = Label:new(140, 45, 20, 20, "Y:")
local Label8 = Label:new(95, 65, 20, 20, "Element:")
local Button60 = Button:new(90, 175, 170, 17, "Ok")
local Checkbox10 = Checkbox:new(85, 83, 30, 30, "Set temp by coordinates")
local TypeTextbox10 = Textbox:new(130, 50, 45, 16)
local TypeTextbox20 = Textbox:new(115, 67, 45, 16)
local TypeTextbox30 = Textbox:new(95, 47, 45, 16)
local TypeTextbox40 = Textbox:new(157, 47, 45, 16)
local Label50 = Label:new(70, 65, 60, 16, "")
local Button61 = Button:new(90, 175, 170, 17, "Ok")
local Checkbox11 = Checkbox:new(85, 83, 30, 30, "Set life by coordinates")
local TypeTextbox11 = Textbox:new(130, 50, 45, 16)
local TypeTextbox21 = Textbox:new(115, 67, 45, 16)
local TypeTextbox31 = Textbox:new(95, 47, 45, 16)
local TypeTextbox41 = Textbox:new(157, 47, 45, 16)
local Button62 = Button:new(90, 175, 170, 17, "Ok")
local Checkbox12 = Checkbox:new(85, 83, 30, 30, "Set tmp by coordinates")
local TypeTextbox12 = Textbox:new(130, 50, 45, 16)
local TypeTextbox22 = Textbox:new(115, 67, 45, 16)
local TypeTextbox32 = Textbox:new(95, 47, 45, 16)
local TypeTextbox42 = Textbox:new(157, 47, 45, 16)
local Button63 = Button:new(90, 175, 170, 17, "Ok")
local Checkbox13 = Checkbox:new(85, 83, 30, 30, "Set tmp2 by coordinates")
local TypeTextbox13 = Textbox:new(130, 50, 45, 16)
local TypeTextbox23 = Textbox:new(115, 67, 45, 16)
local TypeTextbox33 = Textbox:new(95, 47, 45, 16)
local TypeTextbox43 = Textbox:new(157, 47, 45, 16)
local Button64 = Button:new(90, 175, 170, 17, "Ok")
local Checkbox14 = Checkbox:new(85, 83, 30, 30, "Set ctype by coordinates")
local TypeTextbox14 = Textbox:new(130, 50, 45, 16)
local TypeTextbox24 = Textbox:new(115, 67, 45, 16)
local TypeTextbox34 = Textbox:new(95, 47, 45, 16)
local TypeTextbox44 = Textbox:new(157, 47, 45, 16)
local Button65 = Button:new(90, 175, 170, 17, "Ok")
local TypeTextbox45 = Textbox:new(158, 47, 45, 16)
local TypeTextbox46 = Textbox:new(95, 47, 45, 16)
local TypeTextbox47 = Textbox:new(129, 67, 45, 16)
function labeloff()
Checkbox1:checked(false)
Checkbox10:checked(false)
Checkbox11:checked(false)
Checkbox12:checked(false)
Checkbox13:checked(false)
Checkbox14:checked(false)
Button11:visible(false)
Button12:visible(false)
Button13:visible(false)
Button14:visible(false)
Button15:visible(false)
Button16:visible(false)
Button65:visible(false)
Label6:visible(false)
Label7:visible(false)
Label8:visible(false)
TypeTextbox45:visible(false)
TypeTextbox46:visible(false)
TypeTextbox47:visible(false)
end
Button65:visible(false)
TypeTextbox45:visible(false)
TypeTextbox46:visible(false)
TypeTextbox47:visible(false)
Button16:visible(false)
Button12:visible(false)
Button13:visible(false)
Button14:visible(false)
Button15:visible(false)
Button11:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button6:visible(false)
Button60:visible(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
TypeTextbox3:visible(false)
TypeTextbox4:visible(false)
Label6:visible(false)
Label7:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
TypeTextbox30:visible(false)
TypeTextbox40:visible(false)
Checkbox10:visible(false)
Button64:visible(false)
Checkbox14:visible(false)
TypeTextbox14:visible(false)
TypeTextbox24:visible(false)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
Label8:visible(false)
Checkbox1:action(function()
if Checkbox1:checked() then
TypeTextbox1:visible(false)
TypeTextbox3:visible(true)
TypeTextbox4:visible(true)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
TypeTextbox1:visible(true)
TypeTextbox3:visible(false)
TypeTextbox4:visible(false)
Label6:visible(false)
Label7:visible(false)
end
end)
Checkbox10:action(function()
if Checkbox10:checked() then
TypeTextbox30:visible(true)
TypeTextbox40:visible(true)
TypeTextbox10:visible(false)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
Label6:visible(false)
Label7:visible(false)
TypeTextbox10:visible(true)
TypeTextbox30:visible(false)
TypeTextbox40:visible(false)
end
end)
Checkbox11:action(function()
if Checkbox11:checked() then
TypeTextbox11:visible(false)
TypeTextbox31:visible(true)
TypeTextbox41:visible(true)
TypeTextbox10:visible(false)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
Label6:visible(false)
Label7:visible(false)
TypeTextbox11:visible(true)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
end
end)
Checkbox12:action(function()
if Checkbox12:checked() then
TypeTextbox12:visible(false)
TypeTextbox32:visible(true)
TypeTextbox42:visible(true)
TypeTextbox12:visible(false)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
Label6:visible(false)
Label7:visible(false)
TypeTextbox12:visible(true)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
end
end)
Checkbox13:action(function()
if Checkbox13:checked() then
TypeTextbox13:visible(false)
TypeTextbox33:visible(true)
TypeTextbox43:visible(true)
TypeTextbox12:visible(false)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
Label6:visible(false)
Label7:visible(false)
TypeTextbox13:visible(true)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
end
end)
Checkbox14:action(function()
if Checkbox14:checked() then
TypeTextbox14:visible(false)
TypeTextbox34:visible(true)
TypeTextbox44:visible(true)
TypeTextbox14:visible(false)
Label6:visible(true)
Label7:visible(true)
Label4:visible(false)
else
Label4:visible(true)
Label6:visible(false)
Label7:visible(false)
TypeTextbox14:visible(true)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
end
end)
function enable1()
Button2:enabled(false)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(true)
end
function enable2()
Button2:enabled(true)
Button3:enabled(false)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(true)
end
function enable3()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(false)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(true)
end
function enable4()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(false)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(true)
end
function enable5()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(false)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(true)
end
function enable6()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(false)
Button10:enabled(true)
Button17:enabled(true)
end
function enable7()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(false)
Button17:enabled(true)
end
Button2:action(function()
button9v1()
labeloff()
Label50:text('')
Label1:text('Replaces the element 1 to\nelement 2 or replaces it\nby coordinates')
Label4:text('Element 1:')
TypeTextbox1:visible(true)
TypeTextbox2:visible(true)
Label5:visible(true)
Checkbox1:visible(true)
Button6:visible(true)
Button60:visible(false)
Checkbox10:checked(false)
TypeTextbox30:visible(false)
TypeTextbox40:visible(false)
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
enable1()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
end)
Button3:action(function()
Label4:text('Element 1:')
labeloff()
Label1:text('Set temp to element\nor set temp by coordinates')
Label50:text('Temp:')
Checkbox1:checked(false)
TypeTextbox10:visible(true)
TypeTextbox20:visible(true)
Checkbox10:visible(true)
Button60:visible(true)
Button6:visible(false)
TypeTextbox3:visible(false)
TypeTextbox4:visible(false)
Label6:visible(false)
Label7:visible(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
enable2()
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button7:enabled(true)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
button9v1()
end)
Button4:action(function()
button9v1()
Label4:text('Element 1:')
labeloff()
Label1:text('Set life to element\nor set life by coordinates')
Label50:text('Life:')
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
enable3()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(true)
Checkbox11:visible(true)
TypeTextbox11:visible(true)
TypeTextbox21:visible(true)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button7:enabled(true)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
end)
Button7:action(function()
Label4:text('Element 1:')
labeloff()
Label1:text('Set tmp to element\nor set tmp by coordinates')
Label50:text('Tmp:')
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
enable4()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button62:visible(true)
Checkbox12:visible(true)
TypeTextbox12:visible(true)
TypeTextbox22:visible(true)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
button9v1()
end)
Button8:action(function()
Label4:text('Element 1:')
labeloff()
Label1:text('Set tmp2 to element\nor set tmp2 by coordinates')
Label50:text('Tmp2:')
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
enable5()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
button9v1()
Button63:visible(true)
Checkbox13:visible(true)
TypeTextbox13:visible(true)
TypeTextbox23:visible(true)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
end)
function button9v1()
Button64:visible(false)
Checkbox14:visible(false)
TypeTextbox14:visible(false)
TypeTextbox24:visible(false)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
end
function button9v2()
Button64:visible(true)
Checkbox14:visible(true)
TypeTextbox14:visible(true)
TypeTextbox24:visible(true)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
end
function button10v1()
Button64:visible(false)
Checkbox14:visible(false)
TypeTextbox14:visible(false)
TypeTextbox24:visible(false)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
end
Button9:action(function()
Label4:text('Element 1:')
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
labeloff()
enable6()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Label1:text('Set ctype to element\nor set ctype by coordinates')
Label50:text('Ctype:')
button9v2()
end)
Button10:action(function()
Label50:text('')
Label4:text('')
labeloff()
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
enable7()
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button11:visible(true)
button10v1()
Button12:visible(true)
Button13:visible(true)
Button14:visible(true)
Button15:visible(true)
Button16:visible(true)
Label1:text('')
end)
Button17:action(function()
Button2:enabled(true)
Button3:enabled(true)
Button4:enabled(true)
Button8:enabled(true)
Button7:enabled(true)
Button9:enabled(true)
Button10:enabled(true)
Button17:enabled(false)
Label50:text('')
Label4:text('')
labeloff()
Label8:visible(true)
Button6:visible(false)
Button60:visible(false)
Checkbox1:checked(false)
Checkbox10:checked(false)
TypeTextbox1:visible(false)
TypeTextbox2:visible(false)
Label5:visible(false)
Checkbox1:visible(false)
TypeTextbox10:visible(false)
TypeTextbox20:visible(false)
Checkbox10:visible(false)
Button61:visible(false)
Checkbox11:visible(false)
TypeTextbox11:visible(false)
TypeTextbox21:visible(false)
TypeTextbox31:visible(false)
TypeTextbox41:visible(false)
Button62:visible(false)
Checkbox12:visible(false)
TypeTextbox12:visible(false)
TypeTextbox22:visible(false)
TypeTextbox32:visible(false)
TypeTextbox42:visible(false)
Button63:visible(false)
Checkbox13:visible(false)
Checkbox14:visible(false)
TypeTextbox13:visible(false)
TypeTextbox23:visible(false)
TypeTextbox33:visible(false)
TypeTextbox43:visible(false)
Button11:visible(false)
Button12:visible(false)
Button13:visible(false)
Button14:visible(false)
Button15:visible(false)
Button16:visible(false)
Label1:text('Create pixel at coordinates')
TypeTextbox45:visible(true)
TypeTextbox46:visible(true)
TypeTextbox47:visible(true)
TypeTextbox14:visible(false)
TypeTextbox24:visible(false)
TypeTextbox34:visible(false)
TypeTextbox44:visible(false)
Label6:visible(true)
Label7:visible(true)
Button65:visible(true)
end)
--type
Button6:action(function()
if Checkbox1:checked() then
tpt.set_property("life",2,x,y)
tpt.set_property("ctype",TypeTextbox2:text(),x,y)
tpt.set_property("tmp",TypeTextbox3:text(),x,y)
tpt.set_property("tmp2",TypeTextbox4:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",1,x,y)
tpt.set_property("ctype",TypeTextbox2:text(),x,y)
tpt.set_property("tmp",TypeTextbox1:text(),x,y)
interface.closeWindow(Main)
end
end)
--temp
Button60:action(function()
if Checkbox10:checked() then
tpt.set_property("life",3,x,y)
tpt.set_property("ctype",TypeTextbox20:text(),x,y)
tpt.set_property("tmp",TypeTextbox30:text(),x,y)
tpt.set_property("tmp2",TypeTextbox40:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",4,x,y)
tpt.set_property("ctype",TypeTextbox10:text(),x,y)
tpt.set_property("tmp",TypeTextbox20:text(),x,y)
interface.closeWindow(Main)
end
end)
--life
Button61:action(function()
if Checkbox11:checked() then
tpt.set_property("life",6,x,y)
tpt.set_property("ctype",TypeTextbox21:text(),x,y)
tpt.set_property("tmp",TypeTextbox31:text(),x,y)
tpt.set_property("tmp2",TypeTextbox41:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",5,x,y)
tpt.set_property("ctype",TypeTextbox11:text(),x,y)
tpt.set_property("tmp",TypeTextbox21:text(),x,y)
interface.closeWindow(Main)
end
end)
--tmp
Button62:action(function()
if Checkbox12:checked() then
tpt.set_property("life",7,x,y)
tpt.set_property("ctype",TypeTextbox22:text(),x,y)
tpt.set_property("tmp",TypeTextbox32:text(),x,y)
tpt.set_property("tmp2",TypeTextbox42:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",8,x,y)
tpt.set_property("ctype",TypeTextbox12:text(),x,y)
tpt.set_property("tmp",TypeTextbox22:text(),x,y)
interface.closeWindow(Main)
end
end)
--tmp2
Button63:action(function()
if Checkbox13:checked() then
tpt.set_property("life",9,x,y)
tpt.set_property("ctype",TypeTextbox23:text(),x,y)
tpt.set_property("tmp",TypeTextbox33:text(),x,y)
tpt.set_property("tmp2",TypeTextbox43:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",10,x,y)
tpt.set_property("ctype",TypeTextbox13:text(),x,y)
tpt.set_property("tmp",TypeTextbox23:text(),x,y)
interface.closeWindow(Main)
end
end)
--ctype
Button64:action(function()
if Checkbox14:checked() then
tpt.set_property("life",12,x,y)
tpt.set_property("ctype",TypeTextbox24:text(),x,y)
tpt.set_property("tmp",TypeTextbox34:text(),x,y)
tpt.set_property("tmp2",TypeTextbox44:text(),x,y)
interface.closeWindow(Main)
else
tpt.set_property("life",11,x,y)
tpt.set_property("ctype",TypeTextbox24:text(),x,y)
tpt.set_property("tmp",TypeTextbox14:text(),x,y)
interface.closeWindow(Main)
end
end)
Button65:action(function()
tpt.set_property("life",19,x,y)
tpt.set_property("ctype",TypeTextbox47:text(),x,y)
tpt.set_property("tmp",TypeTextbox45:text(),x,y)
tpt.set_property("tmp2",TypeTextbox46:text(),x,y)
interface.closeWindow(Main)
end)
Button11:action(function()
tpt.set_property("life",13,x,y)
interface.closeWindow(Main)
end)
Button12:action(function()
tpt.set_property("life",15,x,y)
interface.closeWindow(Main)
end)
Button13:action(function()
tpt.set_property("life",16,x,y)
interface.closeWindow(Main)
end)
Button14:action(function()
local z=tpt.input('Gravity', '0 - Vertical\n1 - No gravity\n2 - Radial')
if tonumber(z)>2 then
z=0
end
tpt.set_property("life",14,x,y)
tpt.set_property("tmp",z,x,y)
interface.closeWindow(Main)
end)
Button15:action(function()
tpt.set_property("life",17,x,y)
interface.closeWindow(Main)
end)
Button16:action(function()
local z=tpt.input('Diasplay mode', '0 = Velocity\n1 = Pressure\n2 = Persistent\n3 = Fire\n4 = Blob\n5 = Heat\n6 = Fancy\n7 = Nothing\n8 = Heat Gradient\n9 = Life Gradient\n10 = Alternate Velocity')
if tonumber(z)>10 then
z=4
end
tpt.set_property("life",18,x,y)
tpt.set_property("tmp",z,x,y)
interface.closeWindow(Main)
end)
Main:addComponent(Button61)
Main:addComponent(Button65)
Main:addComponent(Checkbox11)
Main:addComponent(TypeTextbox11)
Main:addComponent(TypeTextbox21)
Main:addComponent(TypeTextbox31)
Main:addComponent(TypeTextbox41)
Main:addComponent(Checkbox1)
Main:addComponent(Button1)
Main:addComponent(Button2)
Main:addComponent(Button3)
Main:addComponent(Button4)
Main:addComponent(Button5)
Main:addComponent(Button6)
Main:addComponent(Button17)
Main:addComponent(Button10)
Main:addComponent(Label1)
Main:addComponent(Label4)
Main:addComponent(Label5)
Main:addComponent(Label6)
Main:addComponent(Label7)
Main:addComponent(Label8)
Main:addComponent(TypeTextbox1)
Main:addComponent(TypeTextbox2)
Main:addComponent(TypeTextbox3)
Main:addComponent(TypeTextbox4)
Main:addComponent(Button60)
Main:addComponent(Checkbox10)
Main:addComponent(Label50)
Main:addComponent(TypeTextbox10)
Main:addComponent(TypeTextbox20)
Main:addComponent(TypeTextbox30)
Main:addComponent(TypeTextbox40)
Main:addComponent(Button8)
Main:addComponent(Button7)
Main:addComponent(Button11)
Main:addComponent(Button62)
Main:addComponent(Checkbox12)
Main:addComponent(TypeTextbox12)
Main:addComponent(TypeTextbox22)
Main:addComponent(TypeTextbox32)
Main:addComponent(TypeTextbox42)
Main:addComponent(Button63)
Main:addComponent(Checkbox13)
Main:addComponent(TypeTextbox13)
Main:addComponent(TypeTextbox23)
Main:addComponent(TypeTextbox33)
Main:addComponent(TypeTextbox43)
Main:addComponent(Button9)
Main:addComponent(Button64)
Main:addComponent(Checkbox14)
Main:addComponent(TypeTextbox14)
Main:addComponent(TypeTextbox24)
Main:addComponent(TypeTextbox34)
Main:addComponent(TypeTextbox44)
Main:addComponent(TypeTextbox45)
Main:addComponent(TypeTextbox46)
Main:addComponent(TypeTextbox47)
Main:addComponent(Button12)
Main:addComponent(Button13)
Main:addComponent(Button14)
Main:addComponent(Button15)
Main:addComponent(Button16)
end
tpt.element_func(cmnd2,elements.SSCCSSCC_PT_CMND2)
function cmnd(i,x,y,s,n)
local life=tpt.get_property("life",x,y)
local ar2=tpt.get_property("ctype",x,y)
local ar3=tpt.get_property("tmp",x,y)
local ar6=tpt.get_property("tmp2",x,y)
local sprk=tpt.get_property("type",x+1,y)
local sprk2=tpt.get_property("type",x-1,y)
local sprk3=tpt.get_property("type",x,y-1)
local sprk4=tpt.get_property("type",x,y+1)
if (sprk==tpt.el.sprk.id) or (sprk2==tpt.el.sprk.id) or (sprk3==tpt.el.sprk.id) or (sprk4==tpt.el.sprk.id) then
if life==1 then
ar5=elements.property(ar3,"Name")
tpt.set_property("type",ar2,ar5)
else
if life==2 then
tpt.set_property("type",ar2,ar3,ar6)
else
if life==4 then
ar5=elements.property(ar2,"Name")
tpt.set_property("temp",ar3,ar5)
else
if life==3 then
tpt.set_property("temp",ar2,ar3,ar6)
else
if life==5 then
ar5=elements.property(ar2,"Name")
tpt.set_property("life",ar3,ar5)
else
if life==6 then
tpt.set_property("life",ar2,ar3,ar6)
else
if life==8 then
ar5=elements.property(ar2,"Name")
tpt.set_property("tmp",ar3,ar5)
else
if life==7 then
tpt.set_property("tmp",ar2,ar3,ar6)
else
if (sprk==tpt.el.sprk.id) and (life==10) then
ar5=elements.property(ar2,"Name")
tpt.set_property("tmp2",ar3,ar5)
else
if life==9 then
tpt.set_property("tmp2",ar2,ar3,ar6)
else
if life==11 then
ar5=elements.property(ar3,"Name")
tpt.set_property("ctype",ar2,ar5)
else
if life==12 then
tpt.set_property("ctype",ar2,ar3,ar6)
else
if life==13 then
tpt.set_pause(1)
else
if life==14 then
sim.gravityMode(ar3)
else
if life==15 then
sim.resetTemp()
else
if life==16 then
sim.resetPressure()
else
if life==17 then
tpt.reset_spark()
else
if life==18 then
tpt.display_mode(ar3)
else
if life==19 then
tpt.create(ar6, ar3, ar2)
end end end end end end end end end end end end end end end end end end end
end
end
tpt.element_func(cmnd,elements.SSCCSSCC_PT_CMND)
Description:
Changelog: