1.2 KiB
1.2 KiB
Display
_A specialized element that provides direct access to ComputerCraft's Window API. _ It acts as a canvas where you can use standard CC terminal operations, making it ideal for: - Integration with existing CC programs and APIs - Custom drawing operations - Terminal emulation - Complex text manipulation The Display maintains its own terminal buffer and can be manipulated using familiar CC terminal methods.
Extends: VisualElement
Functions
| Method | Returns | Description |
|---|---|---|
| Display:getWindow | table | Gets the CC window instance |
| Display:write | Display | Writes colored text to the display |
Display:getWindow()
Retrieves the underlying ComputerCraft window object
Returns
tablewindowA CC window object with all standard terminal methods
Display:write(x, y, text, fg?, bg?)
Writes text directly to the display with optional colors
Parameters
xnumberX position (1-based)ynumberY position (1-based)textstringText to writefg(optional)colorsForeground color (optional)bg(optional)colorsBackground color (optional)
Returns
DisplayselfFor method chaining