Difference between revisions of "Advanced Monitor"

From ComputerCraft Wiki
Jump to: navigation, search
m (Update to Peripheral field - now lists wrapped callable.)
m (Recipe)
 
(8 intermediate revisions by 6 users not shown)
Line 2: Line 2:
 
|name=Advanced Monitor
 
|name=Advanced Monitor
 
|image=Iso_Advanced_Monitor.png
 
|image=Iso_Advanced_Monitor.png
|id=4094
+
|id=ComputerCraft:CC-Peripheral
|damage-value=Un-used (clarify?)
+
|damage-value=4
 
|is-peripheral=Yes
 
|is-peripheral=Yes
 
|peripheral-api=Term (API)
 
|peripheral-api=Term (API)
 
}}
 
}}
The Advanced Monitor is a new, improved version of the [[Monitor]].
+
The Advanced Monitor is a [[Monitor]] that has mouse (as 'punches') support, and can use the [[Color_(API)|Color API]] for screen colors. They resemble the traditional computer console, but are golden coloured to match their crafting [[recipes|recipe]]. By default, an advanced monitor has a [[resolution]] of 7 pixels horizontally by 5 pixels horizontally, but this can be increased by using the monitor API and combining monitors (see explanation on the [[resolution]] page).
  
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]].
+
== Crafting ==
 
+
{{Crafting
For a list of the available colors on both [[Advanced Computer|Advanced Computers]] and the [[Advanced Monitor|Advanced Monitors]], see [[Colors_(API)#Colors|Colors API]].
+
  |A1=Gold Ingot |B1=Gold Ingot   |C1=Gold Ingot
 
+
  |A2=Gold Ingot |B2=glass pane |C2=Gold Ingot
==Recipe==
+
  |A3=Gold Ingot |B3=Gold Ingot   |C3=Gold Ingot
{{Crafting grid
+
  |Output=Advanced Monitor |OA=4
  |A1=Gold_Ingot |B1=Gold_Ingot   |C1=Gold_Ingot
+
}}
  |A2=Gold_Ingot |B2=glass_pane |C2=Gold_Ingot
+
  |A3=Gold_Ingot |B3=Gold_Ingot   |C3=Gold_Ingot
+
  |Output=Advanced_Monitor |OA=4
+
}}
+
  
 
==Using an Advanced Monitor==
 
==Using an Advanced Monitor==
Line 26: Line 22:
 
The Advanced Monitor introduces two new methods: ''[[term.setTextColor|monitor.setTextColor]]([[colors (API)#colors|color]])'' and ''[[term.setBackgroundColor|monitor.setBackgroundColor]]([[colors (API)#colors|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.
 
The Advanced Monitor introduces two new methods: ''[[term.setTextColor|monitor.setTextColor]]([[colors (API)#colors|color]])'' and ''[[term.setBackgroundColor|monitor.setBackgroundColor]]([[colors (API)#colors|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)|Peripheral API]]. Wrapped monitors provide all functions listed in the [[Term_(API)|Term API]].
+
To use an Advanced Monitor, you need to either call a method directly using [[peripheral.call]](), or, wrap the monitor using the [[Peripheral_(API)|Peripheral API]]. Wrapped monitors provide all functions listed in the [[Term_(API)|Term API]], with the exception of [[Monitor.setTextScale|monitor.setTextScale(size)]], which is native to monitors only.
  
 
For this example, we have an Advanced Monitor connected to the top of our [[Computer]]:
 
For this example, we have an Advanced Monitor connected to the top of our [[Computer]]:
  
  -- Immediately invoke a method without wrapping
+
  ''-- Immediately invoke a method without wrapping''
  peripheral.call("top", "write", "Hello World!")
+
  [[peripheral.call]]( "top", "write", "Hello World!" )
 +
 
 +
''-- You can also "wrap" the peripheral side to a variable:''
 +
local monitor = [[peripheral.wrap]]( "top" )
 +
[[term.write|monitor.write]]( "Hello World!" )
  
-- You can also "wrap" the peripheral side to a variable:
+
== History ==
local monitor = peripheral.wrap("top")
+
{{History|head}}
monitor.write("Hello World!")
+
{{History|1.45|Added Advanced Monitors.}}
 +
{{History|1.48|Changed crafting recipe.|Can now be used as touchscreens.}}
 +
{{History|1.51|Event <code>monitor_resize</code> is send when rezising the monitor.}}
 +
{{History|1.53|Can now be placed on floors and ceilings.}}
 +
{{History|1.55|Tweaked screen colours.}}
 +
{{History|1.75|Fixed rendering.}}
 +
{{History|foot}}
  
 +
{{BlocksItemsList}}
  
[[Category:Blocks]][[Category:Peripherals]]
+
[[Category:Blocks]]

Latest revision as of 06:00, 4 August 2020

Grid workbench.png   Advanced Monitor
Iso Advanced Monitor.png
Item ID ComputerCraft:CC-Peripheral
Damage Value 4
Peripheral? Yes- Term (API)

The Advanced Monitor is a Monitor that has mouse (as 'punches') support, and can use the Color API for screen colors. They resemble the traditional computer console, but are golden coloured to match their crafting recipe. By default, an advanced monitor has a resolution of 7 pixels horizontally by 5 pixels horizontally, but this can be increased by using the monitor API and combining monitors (see explanation on the resolution page).

Crafting

Empty-crafting-table.png
Grid Gold Ingot.png
Grid Gold Ingot.png
Grid Gold Ingot.png
Grid Gold Ingot.png
Grid glass pane.png
Grid Gold Ingot.png
Grid Advanced Monitor.png
Advanced MonitorAdvanced Monitor
Grid Gold Ingot.png
Grid Gold Ingot.png
Grid Gold Ingot.png

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!" )

History

1.45Added Advanced Monitors.
1.48Changed crafting recipe.
Can now be used as touchscreens.
1.51Event monitor_resize is send when rezising the monitor.
1.53Can now be placed on floors and ceilings.
1.55Tweaked screen colours.
1.75Fixed rendering.
Grid Redstone.pngComputerCraft Blocks and Items
Grid paper.png  Blocks
 Iso Computer.png  Computer Iso Advanced Computer.png  Advanced Computer Iso Command Computer.png  Command Computer Iso DiskDrive.png  Disk Drive
 Iso Monitor.png  Monitor Iso Advanced Monitor.png  Advanced Monitor Iso Printer.png  Printer Grid turtle.png  Turtle
 Grid Modem.png  Wireless Modem Grid Ender Modem.png  Ender Modem Grid Wired Modem.png  Wired Modem Grid Networking Cable.png  Networking Cable
Grid paper.png  Items
 Grid Pocket Computer.png  Pocket Computer Grid Advanced Pocket Computer.png  Advanced Pocket Computer Grid disk.png  Floppy Disk Grid printed page.png  Printed Page
 Grid printed pages.png  Printed Pages Grid printed book .png  Printed Book