This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
component:screen [2014/07/10 11:59] sangar created |
component:screen [2024/03/26 15:59] dcnick3 |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | Component: Screen | ||
+ | ================ | ||
This component is provided by [[block:screen|screen blocks]] (either when placed in the world or when installed in a robot). | This component is provided by [[block:screen|screen blocks]] (either when placed in the world or when installed in a robot). | ||
Line 6: | Line 8: | ||
- `isOn():boolean` | - `isOn():boolean` | ||
Returns whether the screen is currently on. | Returns whether the screen is currently on. | ||
- | - `turnOn():boolean` | + | - `turnOn():boolean, boolean` |
- | Turns the screen on. Returns true if it was off. | + | Turns the screen on. Returns whether it was off and the new power state. |
- | - `turnOff():boolean` | + | - `turnOff():boolean, boolean` |
- | Turns off the screen. Returns true if it was on. | + | Turns off the screen. Returns whether it was on and the new power state. |
- `getAspectRatio():number, number` | - `getAspectRatio():number, number` | ||
The aspect ratio of the screen. For multi-block screens this is the number of blocks, horizontal and vertical. | The aspect ratio of the screen. For multi-block screens this is the number of blocks, horizontal and vertical. | ||
- `getKeyboards():table` | - `getKeyboards():table` | ||
The list of keyboards attached to the screen. | The list of keyboards attached to the screen. | ||
+ | - `setPrecise(enabled:boolean):boolean` | ||
+ | Set whether to use high-precision mode (sub-pixel mouse event position). | ||
+ | //Requires Screen (Tier 3).// | ||
+ | - `isPrecise():boolean` | ||
+ | Check whether high-precision mode is enabled (sub-pixel mouse event position). | ||
+ | //Requires Screen (Tier 3).// | ||
+ | - `setTouchModeInverted(enabled:boolean):boolean` | ||
+ | Sets Inverted Touch mode (Sneak-activate opens GUI if set to true). | ||
+ | - `isTouchModeInverted():boolean` | ||
+ | Check to see if Inverted Touch mode is enabled (Sneak-activate opens GUI is set to true). | ||
---- | ---- | ||
{{page>component:contents&noheader&noeditbutton&nouser&nofooter}} | {{page>component:contents&noheader&noeditbutton&nouser&nofooter}} |