Posted 15 May 2014 - 09:18 PM
The problem is, that the monitor updates its background color very slowly.
When you press on an advanced monitor it seems that it skips multiple 'monitor_touch'
events. So the background of the monitor would change only like 4 times if you rapid click on
it.
Note: I encountered this with an 4x3 advanced monitor.
Here is the code:
When you press on an advanced monitor it seems that it skips multiple 'monitor_touch'
events. So the background of the monitor would change only like 4 times if you rapid click on
it.
Note: I encountered this with an 4x3 advanced monitor.
Here is the code:
local mon = peripheral.wrap("left")
local color = 1
while true do
os.pullEvent("monitor_touch")
color = color + 1
if color > 16 then
color = 1
end
mon.setBackgroundColor(color)
mon.clear()
end