Screen: Difference between revisions
imported>OCDoc Import Imported from legacy OpenComputers documentation at ocdoc.cil.li |
m SoraFirestorm moved page Block/screen to Screen without leaving a redirect: Page has been unified |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
= | = Overview = | ||
[[File:screen1.png|128px]] [[File:screen2.png|128px]] [[File:screen3.png|128px]] | [[File:screen1.png|128px]] [[File:screen2.png|128px]] [[File:screen3.png|128px]] | ||
| Line 5: | Line 5: | ||
Display text, controlled by a [[Item/graphics card|Graphics Card]] in a [[Block/case|Case]]. | Display text, controlled by a [[Item/graphics card|Graphics Card]] in a [[Block/case|Case]]. | ||
* Maximum resolution: 50x16/80x25/160x50. | * Maximum resolution: 50x16/80x25/160x50. | ||
* Maximum color depth: 1/4/8. | |||
Screens allow computers to display text, by binding them on a graphics card and then changing their text buffer. Think of these screens more like... chalk boards. You don't have to send the data to display each "frame", instead you set something to display, and the screen will continue displaying it until it's told to display something else. There are a few scenarios where a screen's buffer will be cleared, though: when they are merged into a multi-block screen, when the controlling computer is turned off, and when they are bound by a graphics card. | Screens allow computers to display text, by binding them on a graphics card and then changing their text buffer. Think of these screens more like... chalk boards. You don't have to send the data to display each "frame", instead you set something to display, and the screen will continue displaying it until it's told to display something else. There are a few scenarios where a screen's buffer will be cleared, though: when they are merged into a multi-block screen, when the controlling computer is turned off, and when they are bound by a graphics card. | ||
| Line 11: | Line 12: | ||
Note that screens of all tiers can be controlled by graphics cards of all tiers. However, the minimum capabilities of each combination apply. For example, when using an advanced screen via a basic graphics card, the maximum resolution and color depth will be limited by that of the graphics card. | Note that screens of all tiers can be controlled by graphics cards of all tiers. However, the minimum capabilities of each combination apply. For example, when using an advanced screen via a basic graphics card, the maximum resolution and color depth will be limited by that of the graphics card. | ||
Tier two and three screens allow mouse input: it generates a | Tier two and three screens allow mouse input: it generates a <code>touch</code> signal on all computers in its network whenever a user either right-clicks/activates the display area of a screen ''without'' a keyboard - like a giant touch screen - or when left clicking on the display area in the GUI of a screen ''with'' a keyboard. They also generate a <code>walk</code> signal when a mob moves while walking on the screen. | ||
As of version 1.3, tier 2 screens use a 16 color ''palette'', that defaults to the Minecraft colors and can be manipulated as desired. Tier 3 screens have a hybrid color system, where 240 colors are "automatic" and a 16 color palette exists that defaults to different shades of grey, but can also be manipulated as desired. | As of version 1.3, tier 2 screens use a 16 color ''palette'', that defaults to the Minecraft colors and can be manipulated as desired. Tier 3 screens have a hybrid color system, where 240 colors are "automatic" and a 16 color palette exists that defaults to different shades of grey, but can also be manipulated as desired. | ||
| Line 43: | Line 44: | ||
[[File:t3screen.png|200px]] | [[File:t3screen.png|200px]] | ||
= Component API = | |||
Component name: <code>screen</code>. Callbacks: | |||
== isOn == | |||
<code>isOn():boolean</code> | |||
Returns whether the screen is currently on. | |||
== turnOn == | |||
<code>turnOn():boolean, boolean</code> | |||
Turns the screen on. Returns whether it was off and the new power state. | |||
== turnOff == | |||
<code>turnOff():boolean, boolean</code> | |||
Turns off the screen. Returns whether it was on and the new power state. | |||
== hardwareResolution == | |||
<code>hardwareResolution(): number, number</code> | |||
Gets the maximum resolution supported by the screen regardless of an attached GPU. | |||
== hardwareDepth == | |||
<code>hardwareDepth(): number</code> | |||
Gets the maximum color depth supported by the screen regardless of an attached GPU. | |||
== getAspectRatio == | |||
<code>getAspectRatio():number, number</code> | |||
The aspect ratio of the screen. For multi-block screens this is the number of blocks, horizontal and vertical. | |||
== getKeyboards == | |||
<code>getKeyboards():table</code> | |||
The list of keyboards attached to the screen. | |||
== setPrecise == | |||
<code>setPrecise(enabled:boolean):boolean</code> | |||
Set whether to use high-precision mode (sub-pixel mouse event position). | |||
''Requires Tier 3+ Screen.'' | |||
== isPrecise == | |||
<code>isPrecise():boolean</code> | |||
Check whether high-precision mode is enabled (sub-pixel mouse event position). | |||
''Requires Screen (Tier 3).'' | |||
== setTouchModeInverted == | |||
<code>setTouchModeInverted(enabled:boolean):boolean</code> | |||
Sets Inverted Touch mode (Sneak-activate opens GUI if set to true). | |||
== isTouchModeInverted == | |||
<code>isTouchModeInverted():boolean</code> | |||
Check to see if Inverted Touch mode is enabled (Sneak-activate opens GUI is set to true). | |||
== Contents == | == Contents == | ||
{{:Block/contents}} | {{:Block/contents}} | ||
Latest revision as of 00:32, 28 August 2026
Overview
Display text, controlled by a Graphics Card in a Case.
- Maximum resolution: 50x16/80x25/160x50.
- Maximum color depth: 1/4/8.
Screens allow computers to display text, by binding them on a graphics card and then changing their text buffer. Think of these screens more like... chalk boards. You don't have to send the data to display each "frame", instead you set something to display, and the screen will continue displaying it until it's told to display something else. There are a few scenarios where a screen's buffer will be cleared, though: when they are merged into a multi-block screen, when the controlling computer is turned off, and when they are bound by a graphics card.
Note that screens of all tiers can be controlled by graphics cards of all tiers. However, the minimum capabilities of each combination apply. For example, when using an advanced screen via a basic graphics card, the maximum resolution and color depth will be limited by that of the graphics card.
Tier two and three screens allow mouse input: it generates a touch signal on all computers in its network whenever a user either right-clicks/activates the display area of a screen without a keyboard - like a giant touch screen - or when left clicking on the display area in the GUI of a screen with a keyboard. They also generate a walk signal when a mob moves while walking on the screen.
As of version 1.3, tier 2 screens use a 16 color palette, that defaults to the Minecraft colors and can be manipulated as desired. Tier 3 screens have a hybrid color system, where 240 colors are "automatic" and a 16 color palette exists that defaults to different shades of grey, but can also be manipulated as desired.
The Tier 1 Screen is crafted using the following recipe:
- 4 x Iron Ingot
- 1 x Glass
- 1 x Microchip (Tier 1)
- 3 x Redstone Dust
The Tier 2 Screen is crafted using the following recipe:
- 1 x Microchip (Tier 2)
- 1 x Rose Red
- 1 x Cactus Green
- 1 x Lapis Lazuli
- 4 x Gold Ingot
- 1 x Glass
The Tier 3 Screen is crafted using the following recipe:
- 1 x Microchip (Tier 3)
- 4 x Obsidian
- 1 x Glass
- 3 x Glowstone Dust
Component API
Component name: screen. Callbacks:
isOn
isOn():boolean
Returns whether the screen is currently on.
turnOn
turnOn():boolean, boolean
Turns the screen on. Returns whether it was off and the new power state.
turnOff
turnOff():boolean, boolean
Turns off the screen. Returns whether it was on and the new power state.
hardwareResolution
hardwareResolution(): number, number
Gets the maximum resolution supported by the screen regardless of an attached GPU.
hardwareDepth
hardwareDepth(): number
Gets the maximum color depth supported by the screen regardless of an attached GPU.
getAspectRatio
getAspectRatio():number, number
The aspect ratio of the screen. For multi-block screens this is the number of blocks, horizontal and vertical.
getKeyboards
getKeyboards():table
The list of keyboards attached to the screen.
setPrecise
setPrecise(enabled:boolean):boolean
Set whether to use high-precision mode (sub-pixel mouse event position). Requires Tier 3+ Screen.
isPrecise
isPrecise():boolean
Check whether high-precision mode is enabled (sub-pixel mouse event position). Requires Screen (Tier 3).
setTouchModeInverted
setTouchModeInverted(enabled:boolean):boolean
Sets Inverted Touch mode (Sneak-activate opens GUI if set to true).
isTouchModeInverted
isTouchModeInverted():boolean
Check to see if Inverted Touch mode is enabled (Sneak-activate opens GUI is set to true).
Contents
| Blocks | |
|---|---|
| Computers | Computer Case - Server Rack - Microcontrollers |
| Display | Hologram Projector - Keyboard - Screen |
| Power and Networking | Capacitor - Net Splitter - Power Converter - Power Distributor - Relay |
| Extensions | Adapter - Cable - Disassembler - Disk Drive - Geolyzer - Motion Sensor - Redstone I/O - Transposer - 3D Printer |
| Robotics | Assembler - Charger - Drone - Robot - Waypoint |


