Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local TextThingy = Textbox:new(65, 5, 100, 15,"","Material")
- local DoItButton = Button:new(613, 97, 15, 15, "I")
- local ItButton = Button:new(5, 5, 35, 15, "Fill", "Fills Whole Screen With Given Material")
- local CloseButton = Button:new(195, 5, 15, 15,"X")
- local stuffLabel = Label:new(155 , 8, 50, 10,"")
- local ResetSpark = Button:new(5, 25, 15, 15, "R")
- local StuffWindow = Window:new(150, 100, 215, 45)
- local setButton = Button:new(25, 25, 15, 15, "S", "Sets given property of Everything on screen to given number")
- local PropText = Textbox:new(65, 25, 100, 15,"","Property")
- local SetNumText = Textbox:new(170, 25, 40, 15,"","Number")
- local resetStuffButton = Button:new(45, 25, 15, 15, "E")
- local replaceAllButton = Button:new(45, 5, 15, 15, "T")
- function Initi(initIt)
- StuffWindow:addComponent(initIt)
- end
- ItButton:action(function(sender)
- generatetext()
- sim.createBox(0, 0, 620, 400, tpt.element(textstuff))
- stuffLabel:text("Done")
- end)
- ResetSpark:action(function(sender)
- tpt.reset_spark()
- stuffLabel:text("Done")
- end)
- function generatetext()
- textstuff = TextThingy:text()
- end
- function setGenerate()
- stringset = PropText:text()
- numset = SetNumText:text()
- end
- setButton:action(function(sender)
- setGenerate()
- tpt.set_property(stringset, numset)
- stuffLabel:text("Done")
- end)
- resetStuffButton:action(function(sender)
- simulation.resetPressure()
- simulation.resetTemp()
- tpt.reset_velocity()
- stuffLabel:text("Done")
- end)
- StuffWindow:onTryExit(function()
- interface.closeWindow(StuffWindow)
- end)
- DoItButton:action(function(sender)
- stuffLabel:text("")
- interface.showWindow(StuffWindow)
- end)
- replaceAllButton:action(function(sender)
- generatetext()
- tpt.set_property("type", textstuff)
- end)
- CloseButton:action(function()
- interface.closeWindow(StuffWindow)
- end)
- Initi(TextThingy)
- interface.addComponent(DoItButton)
- Initi(ItButton)
- Initi(CloseButton)
- Initi(stuffLabel)
- Initi(ResetSpark)
- Initi(setButton)
- Initi(PropText)
- Initi(SetNumText)
- Initi(resetStuffButton)
- Initi(replaceAllButton)
- TextThingy:readonly(false)
Advertisement
Add Comment
Please, Sign In to add comment