This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
KiraGio's profile picture

Need a help with buttons and touchscreens (CC)

Started by KiraGio, 15 December 2015 - 02:45 PM
KiraGio #1
Posted 15 December 2015 - 03:45 PM

Hi :)/>

This is a code I'm using for a monitor used in an Auto MFR Auto-Spawner farm with a turtle linked wirelessly to the computer:


http://pastebin.com/0RzLtg72 (I'm linking it since it's a little bit too long for a post)


Everything works. Minutes ago I figured I would like to make every button flash when clicked, like from red to green for a split second. I could implement some kind of button API, but I think I would need to make everything all over again :/


How could I do that? Thanks
Lupus590 #2
Posted 15 December 2015 - 04:47 PM
http://www.computerc...touchpoint-api/

touchpoint is a button api which is quite well supported on the forums.
Edited on 15 December 2015 - 03:48 PM
KiraGio #3
Posted 15 December 2015 - 04:49 PM
http://www.computerc...touchpoint-api/

touchpoint is a button api which is quite well supported on the forums.

As I said: the problem with any kind of API is that I would need to make everytihing all over again.. but I could try anyway.
KingofGamesYami #4
Posted 15 December 2015 - 04:50 PM
Between lines 83 and 84 add some code that draws your button with a different color, waits 0.05, then draws it with the normal color. Then, when a button is clicked, it will flash.
KiraGio #5
Posted 15 December 2015 - 05:15 PM
Between lines 83 and 84 add some code that draws your button with a different color, waits 0.05, then draws it with the normal color. Then, when a button is clicked, it will flash.
Okay, I'm trying that :)/>
KiraGio #6
Posted 15 December 2015 - 05:38 PM
Unfortunately, don't have the time to put my head into it right now, hope I'll be able to do it anyway