Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- declare peripherals
- local peripherals = {"BigReactors-Reactor_0"}
- local bridge = peripheral.wrap("right")
- -- create design
- -- create layout once, so that the design isn't being redrawn all the time
- function addTextNode(x, y, dataTable, vSpacing, textColor)
- -- draw text that conforms to rigid bounds
- for k, v in pairs(dataTable) do
- bridge.addText(x, y+vSpacing, v, textColor)
- end
- end
- function addTextBoxNode(x, y, w, h, opacity, bgColor, padding, dataTable, textColor)
- bridge.addBox(x, y, w, h, bgColor, opacity)
- bridge.addTextNode(x+padding, y+padding, dataTable, 10, textColor)
- end
- -- command / chat message responses
- function commandListener()
- end
- local tableOfData = {"First value", "Second value", "Third value"}
- addTextBoxNode(10, 10, 100, 100, 1, #00ff00, 10, tableOfData, #00ffff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement