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

mouse_drag and changing cell backgrounds

Started by Jasonfran, 28 October 2012 - 01:26 PM
Jasonfran #1
Posted 28 October 2012 - 02:26 PM
Can someone explain how the mouse_drag event works and to change the background of each cell on the screen do you have to set the cursor position for the cell then change the background? Because it seems a bit stupid if I wanted to draw a picture.
Cloudy #2
Posted 28 October 2012 - 04:34 PM
Can someone explain how the mouse_drag event works and to change the background of each cell on the screen do you have to set the cursor position for the cell then change the background? Because it seems a bit stupid if I wanted to draw a picture.

See how the built in paint program works. How is it "stupid"?
Jasonfran #3
Posted 28 October 2012 - 04:59 PM
Well instead of changing the background of the cell the cursor is on, can't you make it so it takes an x and y parameter and changes that cell. And if the x and y are blank, do what it does now.
Jasonfran #4
Posted 28 October 2012 - 05:06 PM
Can't delete this after accidental double post
Cloudy #5
Posted 28 October 2012 - 06:23 PM
Have you looked at the paintutils API to see if it has what you need? Even if it doesn't, it can be a three line function to do what you want.