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

Multiple text scales on advanced monitor

Started by isavegas, 21 April 2013 - 12:33 AM
isavegas #1
Posted 21 April 2013 - 02:33 AM
Edit: DerpDerpDerpDerpDerpDerp
xD I thought it was just a bug. Sorry!

SpoilerI was writing a small program to simply display the server rules on a screen, and I found that when changing text scaling, it changes it for all the text on the screen, not just whatever text is written after using it. I expected it to work like the .setTextColor() function.

Here is the program I was writing (far from complete, I was planning on having the same program be on multiple computers, with the screen's text being dependent on the computer's label.)
Spoiler


args = {...}
m = peripheral.wrap("right")

function rules()
  m.clear()
  m.setTextScale(4)
  m.setCursorPos(1,1)
  m.setTextColor(colors.red)
  m.write("Rules:  ")
  m.setTextScale(2)
  m.setTextColor(colors.lime)
  m.setCursorPos(3,5)
  m.write("1. ")
  m.setCursorPos(3,6)
  m.write("2. ")
  m.setCursorPos(3,7)
  m.write("3. ")
  m.setCursorPos(3,8)
  m.write("4. ")
  m.setTextColor(colors.lightBlue)
  m.setCursorPos(5,5)
  m.write("No spamming")
  m.setCursorPos(5,6)
  m.write("No advertising other servers")
  m.setCursorPos(5,7)
  m.write("Use common sense")
  m.setCursorPos(5,8)
  m.write("No hacking")
end

if args[1] == "rules" then
  rules()
end



Any workarounds?
theoriginalbit #2
Posted 21 April 2013 - 02:34 AM
Nope, there is no way to change formatting of text. Only colours. If you want to make headings just change the background colour to make it stand out.
isavegas #3
Posted 21 April 2013 - 02:38 AM
Nope, there is no way to change formatting of text. Only colours. If you want to make headings just change the background colour to make it stand out.

Thanks. I was just feeling lazy and annoyed from programs I was writing being limited to one text scale, and I assumed (stupidly) that I was supposed to be able to change text scale on the fly, so I didn't bother Googling. :/