Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not fs.exists("clickables") then
- shell.run("pastebin get Je7BEsW3 clickables")
- end
- if not pcall(test = clickables.Toggle:new("Test", 1, 1, 1, 1, 1, 1, 1, 1)) then
- shell.run("delete clickables")
- shell.run("pastebin get Je7BEsW3 clickables")
- end
- local w, h = term.getSize()
- SchematicAdd = clickables.Toggle:new("Create a Schematic", 2, h - 1, 19, h - 1, 1, 16, 1, 13, false)
- SchematicUse = clickables.Toggle:new("Build a Schematic", w - 18, h - 1, w, h - 1, 1, 16, 1, 13, false)
- Begin = clickables.Button:new("Begin", w/2 - 2, h - 2, w/2 + 2, h - 2, 1, 16, 5, 16)
- local mode = nil
- while true do
- SchematicAdd:display()
- SchematicUse:display()
- Begin:display()
- clickables.getEvents()
- if SchematicAdd:check() then
- mode = "add"
- SchematicUse.state = false
- elseif SchematicUse:check() then
- mode = "use"
- SchematicAdd.state = false
- end
- if mode == "add" and Begin:check() then ------======ADD======------
- term.setBackgroundColor(colors.black)
- term.clear()
- elseif mode == "use" and Begin:check() then ------======USE======------
- else
- term.setCursorPos(w/2 - 2, h - 2)
- term.setTextColor(colors.red)
- term.write("Begin")
- sleep(.2)
- Begin:display()
- sleep(.2)
- term.setCursorPos(w/2 - 2, h - 2)
- term.setTextColor(colors.red)
- term.write("Begin")
- sleep(.2)
- Begin:display()
- sleep(.2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement