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

[Question] Monitor [SOLVED]

Started by Engineer, 09 February 2013 - 11:55 AM
Engineer #1
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?
xuma202 #2
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
Engineer #3
Posted 10 February 2013 - 01:21 AM
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 :)/>
mibac138 #4
Posted 10 February 2013 - 01:30 AM

local m = peripheral.wrap("back")
local x, y = m.getSize()
print("X: "..x.." Y: "..y)
WITHOUT one
Engineer #5
Posted 10 February 2013 - 01:42 AM

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.
theoriginalbit #6
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…
Engineer #7
Posted 10 February 2013 - 01:45 AM
No sadly there is no multiple text size support………….yet

Hopefully not yet than :P/>

Thanks for the answer
Dlcruz129 #8
Posted 10 February 2013 - 04:22 AM

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.