Posted 18 April 2014 - 11:17 PM
Hello,
I'm trying to make a statistics screen on a 3x2 monitor but my text doesn't want to behave.
With this code, everything is perfectly centered but if I want to make the words bigger (textScale 2) it's obviously not centered anymore. Multiplying the length by 2 did not work.
Thanks in advance
I'm trying to make a statistics screen on a 3x2 monitor but my text doesn't want to behave.
local mon = peripheral.wrap("right")
local x,y = mon.getSize()
mon.clear()
mon.setTextColor(colors.red)
mon.setTextScale(1)
text = "Stats"
mon.setCursorPos(math.floor(x - text:len())/2, 3)
mon.write(text)
With this code, everything is perfectly centered but if I want to make the words bigger (textScale 2) it's obviously not centered anymore. Multiplying the length by 2 did not work.
Thanks in advance