1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-13 08:49:24 +00:00
CC-Tweaked/src/main/resources/data/computercraft/lua/rom/help/monitors.txt
SquidDev 5e462adc5c Relocate all resource files
- textures/{block,item}s -> textures/{block,item}
 - assets/*/{advancements,lua,recipes} -> data/*/...
2019-04-02 13:18:43 +01:00

24 lines
875 B
Plaintext

The Monitor is a peripheral device available for CraftOS. Type "help peripheral" to learn about using the Peripheral API to connect with peripherals. When a Monitor is connected, peripheral.getType() will return "monitor". A wrapped monitor can be used with term.redirect() to send all terminal output to the monitor.
Methods exposed by the Monitor:
write( text )
blit( text, textColor, backgroundColor )
clear()
clearLine()
getCursorPos()
setCursorPos( x, y )
setCursorBlink( blink )
isColor()
setTextColor( color )
setBackgroundColor( color )
getTextColor()
getBackgroundColor()
getSize()
scroll( n )
setPaletteColor( color, r, g, b )
getPaletteColor( color )
Events fired by the Monitor:
"monitor_touch" when an Advanced Monitor is touched by the player. Arguments are name, x, y
"monitor_resize" when the size of a Monitor changes. Argument is the name of the monitor.