Difference between revisions of "Monitor"
Pokepal101 (Talk | contribs) ("Damage value: unused" needs no clarification... It's just a regular block.) |
(I think this is what "damage value: un-used" actually means.) |
||
Line 3: | Line 3: | ||
|image=Iso_Monitor.png | |image=Iso_Monitor.png | ||
|id=4094 | |id=4094 | ||
− | |damage-value= | + | |damage-value=0 |
|is-peripheral=Yes | |is-peripheral=Yes | ||
}} | }} |
Revision as of 18:27, 9 January 2013
The Monitor is a block that can display text on its front side. When several screen blocks are placed on the same plane, it will form a single monitor. It is useful for displaying information at a server spawn, showing a program on the monitor, and even showing the status of an IC2 reactor! (provided you have CcSensors installed)
Contents
Recipe
Using the Monitor
The command used to control a monitor: monitor [top, bottom, left, right, front or back] [the name of the command to display]
So, in this case, if you typed "hello" in the name of the program part, the monitor would display "Hello World!".
Using the Monitor within the Lua interface
The monitor can be summoned through a command or through coding with the Lua command.
The command used to control a monitor within the Lua interface: shell.run("monitor" "[top, bottom, left, right, front or back]" "[the name of the command to display]")
For example, here is a way of summoning the monitor through a command:
print("Hello Monitor!")
shell.run("monitor", "right", "hello")
Peripheral Functions
monitor stands for the variable you wrapped the monitor to. Example: monitor = peripheral.wrap( "top" )
Methods in italic are available on Advanced Monitors only.
Method name | Description |
---|---|
monitor.write() | Write to the Monitor's screen. |
monitor.scroll(n) | Scrolls the monitor screen. |
monitor.setCursorPos(x, y) | Sets the cursor position on the Monitor. |
monitor.setCursorBlink(b) | Enables or disables cursor blinking. |
monitor.getCursorPos() | Returns two arguments containing the x and the y position of the cursor on the Monitor. |
monitor.getSize() | Returns two arguments containing the x and the y values stating the size of the Monitor. |
monitor.clear() | Clears the Monitor. |
monitor.clearLine() | Clears the line the cursor is on. |
monitor.setTextScale(scale) | Sets the size of the text on the Monitor. Textscale can be between 0.5 and 5.0, with increments of 0.5 |
monitor.setTextColor(color) | Sets the text-color of the Advanced Monitor. Available only to Advanced Monitors |
monitor.setBackgroundColor(color) | Sets the background-color of the Advanced Monitor. Available only to Advanced Monitors |