Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- mon4
- -- 様々な文字色・背景色を表示する
- local mon = peripheral.wrap("top") -- 変数monに各種操作関数を詰め込む
- mon.clear()
- mon.setTextScale(0.5) -- 文字のサイズを0.5にする(標準は1)
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.red) -- 文字色 赤
- mon.setBackgroundColor(colors.white) -- 背景色 白
- mon.write("Hello")
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.blue) -- 文字色 青
- mon.setBackgroundColor(colors.brown) -- 背景色 茶色
- mon.write("CC")
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.yellow) -- 文字色 黄色
- mon.setBackgroundColor(colors.black) -- 背景色 黒
- mon.write("World!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement