This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Inumel's profile picture

Extremely simple openperipheral qestion

Started by Inumel, 26 March 2014 - 10:33 PM
Inumel #1
Posted 26 March 2014 - 11:33 PM
I know this is very simple question, but I simply cannot find the answer anywhere. When you create text with openperipheral glasses bridge there's a way to change it without re-drawing it(as that causes flicker) but I can't remember how, any help would be appreciated
theoriginalbit #2
Posted 26 March 2014 - 11:51 PM

local bridge = peripheral.wrap('left')
local text = bridge.addText(1,1, "hello world", 0xffffff)
text.setText("foo bar")

loop over the text table to see what else you can do
Inumel #3
Posted 26 March 2014 - 11:53 PM
Much appreciated :)/> what would this be called? does each addText just make a table?
theoriginalbit #4
Posted 27 March 2014 - 12:08 AM
yes, when you add anything to the Glasses it returns a table, the table is representative of the element you've added.
Selim #5
Posted 30 June 2014 - 04:02 PM
How would you do this for addBox() or to change the coords of the text?
Edited on 30 June 2014 - 02:04 PM
theoriginalbit #6
Posted 01 July 2014 - 02:09 AM
How would you do this for addBox() or to change the coords of the text?
I don't get what you mean. you'd do it the same way? there's getters/setters for every property each element has.
Selim #7
Posted 04 July 2014 - 01:30 AM
How would you do this for addBox() or to change the coords of the text?
I don't get what you mean. you'd do it the same way? there's getters/setters for every property each element has.
What would you type to do this same kind of thing (changing what is already on the screen) for numbers, in case of coords, box sizes, or even colors.
Edited on 03 July 2014 - 11:35 PM