Difference between revisions of "Advanced Monitor"
m (Added automatic categorization to Category:Peripheral if {{is-peripheral}} is set in template-data.) |
m (Implement {{BlocksItemsList}}) |
||
Line 37: | Line 37: | ||
monitor.write("Hello World!") | monitor.write("Hello World!") | ||
− | + | {{BlocksItemsList}} | |
[[Category:Blocks]] | [[Category:Blocks]] |
Revision as of 19:24, 24 May 2013
Advanced Monitor | |
Item ID | 4094 |
Damage Value | Un-used (clarify?) |
Peripheral? | Yes- Term (API) |
The Advanced Monitor is a new, improved version of the Monitor.
In contrast with the standard Monitor, the Advanced Monitor has the ability to show colored text and programs on the screen, and the Advanced Monitor is golden (like the Advanced Computer), rather than the default stone grey color of the standard Monitor.
For a list of the available colors on both Advanced Computers and the Advanced Monitors, see Colors API.
Recipe
Using an Advanced Monitor
The Advanced Monitor behaves exactly the same as the standard Monitor - except the Advanced Monitor is able to render text with a foreground and background color.
The Advanced Monitor introduces two new methods: monitor.setTextColor(color) and monitor.setBackgroundColor(color). These functions allow you to draw text with a specific foreground and background color. Please note that both spellings of the word color are accepted.
To use an Advanced Monitor, you need to either call a method directly using peripheral.call(), or, wrap the monitor using the Peripheral API. Wrapped monitors provide all functions listed in the Term API, with the exception of monitor.setTextScale(size), which is native to monitors only.
For this example, we have an Advanced Monitor connected to the top of our Computer:
-- Immediately invoke a method without wrapping peripheral.call("top", "write", "Hello World!")
-- You can also "wrap" the peripheral side to a variable: local monitor = peripheral.wrap("top") monitor.write("Hello World!")
ComputerCraft Blocks and Items | |||
Blocks | |||
Computer | Advanced Computer | Command Computer | Disk Drive |
Monitor | Advanced Monitor | Printer | Turtle |
Wireless Modem | Ender Modem | Wired Modem | Networking Cable |
Items | |||
Pocket Computer | Advanced Pocket Computer | Floppy Disk | Printed Page |
Printed Pages | Printed Book |