Jump to content




Extremely simple openperipheral qestion


6 replies to this topic

#1 Inumel

  • Members
  • 120 posts

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

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

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

#3 Inumel

  • Members
  • 120 posts

Posted 26 March 2014 - 11:53 PM

Much appreciated :) what would this be called? does each addText just make a table?

#4 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

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.

#5 Selim

  • Members
  • 189 posts
  • LocationHiding in Online Storage

Posted 30 June 2014 - 03:02 PM

How would you do this for addBox() or to change the coords of the text?

Edited by bladze420, 30 June 2014 - 03:04 PM.


#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 01 July 2014 - 01:09 AM

View Postbladze420, on 30 June 2014 - 03:02 PM, said:

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.

#7 Selim

  • Members
  • 189 posts
  • LocationHiding in Online Storage

Posted 04 July 2014 - 12:30 AM

View Posttheoriginalbit, on 01 July 2014 - 01:09 AM, said:

View Postbladze420, on 30 June 2014 - 03:02 PM, said:

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 by bladze420, 04 July 2014 - 12:35 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users