1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-11-05 09:36:19 +00:00
CC-Tweaked/doc/stub/monitor.lua
Jonathan Coates 9499654757
Add documentation for peripherals
No clue how we're going to do this for the dynamic peripheral system
if/when that ships, but this is a good first stage.

Like the Java APIs, this relies on stub files, so we can't link to the
implementation which is a bit of a shame. However, it's a good first
step.
2020-06-24 12:12:06 +01:00

33 lines
1.0 KiB
Lua

--[[- Monitors are a block which act as a terminal, displaying information on
one side. This allows them to be read and interacted with in-world without
opening a GUI.
Monitors act as @{term.Redirect|terminal redirects} and so expose the same
methods, as well as several additional ones, which are documented below.
Like computers, monitors come in both normal (no colour) and advanced (colour)
varieties.
@module[kind=peripheral] monitor
@usage Write "Hello, world!" to an adjacent monitor:
local monitor = peripheral.find("monitor")
monitor.setCursorPos(1, 1)
monitor.write("Hello, world!")
]]
--- Set the scale of this monitor. A larger scale will result in the monitor
-- having a lower resolution, but display text much larger.
--
-- @tparam number scale The monitor's scale. This must be a multiple of 0.5
-- between 0.5 and 5.
-- @throws If the scale is out of range.
-- @see getTextScale
function setTextScale(scale) end
--- Get the monitor's current text scale.
--
-- @treturn number The monitor's current scale.
function getTextScale() end