ON THIS WIKI
Terminal Glasses is an item added in the OpenPeripheral mod, and is used in conjunction with the Terminal Glasses Bridge to link and communicate with your ComputerCraft Computer or Advanced Computer. The Glasses allow you to create a unique HUD filled with information which you code yourself, ranging from simple text, to a digital clock displaying in-game time, to the status of machines including a full sized chat.
Configuring your own custom HUD isn't too complicated. You can start with simple commands in your Computer's lua console such as:
glass.addBox([x-coordinate], [y-coordinate], [vertical size], [horizontal size], [hexadecimal code]*, 0.2) *Note: ComputerCraft's Color API does not work, only hexadecimal color codes can be used
ex: glass.addBox(1, 1, 50, 50, 0xFFFFFF, 0.2)
This input will result in a small white box on your screen while wearing your Terminal Glasses. Text can also be adding via this input:
glass.addText([x-coord], [y-coord], ["string"], [hexadecimal])
ex: glass.addText(5, 20, "Test Text", 0x000000)
For the text to show up you might need to add:
Now for some basic coding tutorials.
Clock: Ever want to know exactly what time it is in your Minecraft world or Server? Well now it's a bit more accurate than your golden clock from vanilla, and it's hands free!
To program a clock into your Terminal Glasses, you'll start by binding them to your Computer via a Terminal Glasses Bridge. Once they are bound, enter your Computer and open a new program by typing "edit (desired program name)" and follow the steps below.
glass = peripheral.wrap("side the Bridge is on")
time = textutils.formatTime(os.time(), false)
glass.addText(5,2,"TIME: " .. time, 0xFF0000)
while true do
After writing this program, press ctrl, and save. Then exit, and run the program by typing it's name in your Computer and pressing enter.
For a chat that is being updated regularly the below program is provided.
Used in the chat is an API coded by the chat author. If you wish to customize the chat yourself or wish to see the API used the below program is provided.