This is the code, I only tweaked the colors in the gui.lua but didn't touch anything else.
local component = require("component")
local gpu = component.gpu
local gui = require("gui")
local prgName = "Door control"
local version = "0.1"
local sides = require("sides")
local term = require("term")
local event = require("event")
local i = 0
local io = require("io")
function toggleRedstone(guiID, id)
for address in component.list("redstone",true) do
rs = component.proxy(address)
rs.setOutput(5,15)
end
end
function untoggleRedstone(guiID, id)
for address in component.list("redstone",true) do
rs = component.proxy(address)
rs.setOutput(5,0)
end
end
function buttonCallback(guiID, id)
local result = gui.getYesNo("", "Sure?", "")
if result == true then
gui.exit()
end
gui.displayGui(myGui)
end
myGui = gui.newGui(2, 2, 160, 42, false)
exitbutton = gui.newButton(myGui, "center", 38, "exit", buttonCallback)
tButton = gui.newButton(myGui, 1, 2, "Open", toggleRedstone)
untButton = gui.newButton(myGui, 1, 3, "Close", untoggleRedstone)
gui.clearScreen()
gui.setTop(prgName .. " " .. version)
while true do
gui.runGui(myGui)
end