Trying to make a monitor-based to-do list

Started by XSilent_DevilX, Nov 13, 2024, 03:01 AM

Previous topic - Next topic

XSilent_DevilX

Hello, this is my first post on this forum so I apologise if this is the wrong section of the forum.
I am trying to make a to-do list that displays items that need doing on a monitor with the ability to change the color of the text by clicking on each item on the monitor. I want them to be able to change between red, yellow and green text colours. I don't have much experience with interacting with the monitors so any help would be appreciated.

I haven't gotten very far as I dont really know where to begin but here is my code thus far:

local mon = peripheral.wrap("left")
-- Change the text in these brackets to change
-- what the monitor says
local todo1 = "Train infrastructure + Building"
local todo2 = "Train Yard"
local todo3 = "Smeltery"
local todo4 = "Stone Automation"
--
local x = 1
local y = 1
mon.clear()
mon.setTextScale(1)
mon.setCursorPos(x,y)
mon.write(todo1)
mon.setCursorPos(x,y+2)
mon.write(todo2)
mon.setCursorPos(x,y+4)
mon.write(todo3)
mon.setCursorPos(x,y+6)
mon.write(todo4)

Lupus590

If you use term.redirect(mon) then you can use all of the terminal commands that you are familiar with. print will even write to the monitor.

You will be unable to write to the computer's built-in terminal while doing this though.