Jump to content




[Question] Monitor [SOLVED]


7 replies to this topic

#1 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 09 February 2013 - 12:55 PM

Hello,

I was messing with some monitors today and came across some weird activities. The main question is: Do pixels change in CC on monitors or am I going nuts?

I had a 2x2 monitor (advanced) and a computer on the back of those monitors in the down left corner. I ran:
local m = peripheral.wrap("back")one
local x, y = m.getSize()
print("X: "..x.." Y: "..y)

It doesnt matter if the x's and y's are switched, that is not the point. I got nicely print out for me:
X: 30-ish Y: 18-ish

Of course without the ish, cant remember, got quite some numbers in my head:S

Then I wrote my program, wich is just some basic writing on monitors and such, and some events from sorters (MiscPeripherals) and decided I had to move my computer one up.

I ran the same code as above and it printed:
X: 5 Y: 2

Now I am like, well my program doesnt work now anymore. It had some setCursor(17,17) so it wouldnt work with this x, y coordinates.

Does anybody have a clue whats going on?

#2 xuma202

  • Members
  • 288 posts
  • LocationBonn Germany

Posted 09 February 2013 - 01:03 PM

This is impossible by changing the position of the computer only. I've just tried it. Is it possible that you changed the monitors Text Scale?

call monitor.setTextScale(1)
to set the monitors TextScale to 1 you can use anything from 0.5 to 5

#3 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 10 February 2013 - 01:21 AM

View Postxuma202, on 09 February 2013 - 01:03 PM, said:

This is impossible by changing the position of the computer only. I've just tried it. Is it possible that you changed the monitors Text Scale?

call monitor.setTextScale(1)
to set the monitors TextScale to 1 you can use anything from 0.5 to 5
trying that out now

Okay, thanks for the great response. It was the text scale like you said. Thank you very much :)

#4 mibac138

  • Members
  • 132 posts
  • LocationPoland

Posted 10 February 2013 - 01:30 AM

local m = peripheral.wrap("back")
local x, y = m.getSize()
print("X: "..x.." Y: "..y)
WITHOUT one

#5 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 10 February 2013 - 01:42 AM

View Postmibac138, on 10 February 2013 - 01:30 AM, said:

local m = peripheral.wrap("back")
local x, y = m.getSize()
print("X: "..x.." Y: "..y)
WITHOUT one

What are you trying to say ??

-----

My next question, and last one, is: Can you set multiple textscales in one screen? Like title in scale 3, and the content in scale 2?
I cant get that quite to work, it seems to always use the last called scale.

#6 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 10 February 2013 - 01:45 AM

No sadly there is no multiple text size support.............yet... There may be in the future. There were talks about allowing formatting when the new charsets come out. But who knows what's included in that or whether it will actually happen...

#7 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 10 February 2013 - 01:45 AM

View PostTheOriginalBIT, on 10 February 2013 - 01:45 AM, said:

No sadly there is no multiple text size support.............yet

Hopefully not yet than :P

Thanks for the answer

#8 Dlcruz129

    What's a Lua?

  • Members
  • 1,423 posts

Posted 10 February 2013 - 04:22 AM

View PostEngineer, on 10 February 2013 - 01:42 AM, said:

View Postmibac138, on 10 February 2013 - 01:30 AM, said:

local m = peripheral.wrap("back")
local x, y = m.getSize()
print("X: "..x.." Y: "..y)
WITHOUT one

What are you trying to say ??

-----

My next question, and last one, is: Can you set multiple textscales in one screen? Like title in scale 3, and the content in scale 2?
I cant get that quite to work, it seems to always use the last called scale.

Your first line was m = peripheral.wrap("back")one

Edit: You can only have one text scale per screen.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users