Jump to content




Help with using functions in a peripheral


  • You cannot reply to this topic
2 replies to this topic

#1 TheArchitect

  • Members
  • 68 posts

Posted 09 January 2013 - 11:43 AM

Sorry if this is well known or something, I've been searching the forums and I haven't found a question like this and it's not very clear in the wiki.

I have an advanced monitor as a peripheral wrap, and I'd like to use the paintutils API on it, but if I do this:

screen = peripheral.wrap("back")
paintutils.drawImage(...)

It draws the image on the computer's console. I tried the following but it doesn't work.

screen.paintutils.drawImage(...)

How should I do this?

Thanks in advance :)

[Edit] I wanted to use the computer's console to display secondary messages but I think switching between them using term.redirect(...) and term.restore() is acceptable enough for this purpose. Must test.
</noobquestion>

#2 Orwell

    Self-Destructive

  • Members
  • 1,091 posts

Posted 09 January 2013 - 12:18 PM

View PostTheArchitect, on 09 January 2013 - 11:43 AM, said:

[Edit] I wanted to use the computer's console to display secondary messages but I think switching between them using term.redirect(...) and term.restore() is acceptable enough for this purpose. Must test.
That will be your only choice if you want to use paintutils without modification. It is really easy to edit paintutils to use a monitor though. You can look in /rom/apis/paintutils .

#3 TheArchitect

  • Members
  • 68 posts

Posted 09 January 2013 - 12:30 PM

Yes, it's just what I wanted to do. Funny how sometimes you only find out about something after asking about it. I think I can do just fine just by using term.redirect(...)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users