We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Mousepressed overwrite
Page Index Toggle Pages: 1
Mousepressed overwrite? (Read 829 times)
Mousepressed overwrite?
May 7th, 2009, 1:26pm
 
So, I have a grid which is filled out in blocks to resemble a graph, I have used the mousepressed function to fill in part of the grid with a different colour if it's pressed. The only problem is, it won't overwrite things that are already hard coded in to the grid. Any ideas?
Re: Mousepressed overwrite?
Reply #1 - May 7th, 2009, 1:42pm
 
as i know your sketch Smiley tell me what exactly you want to do... ill give it a try.
Re: Mousepressed overwrite?
Reply #2 - May 7th, 2009, 1:47pm
 
Basically, I have the grid now with parts filled in. I am using mousepressed to fill in any block on the grid with a colour which works fine in places where there is nothing already, but if there is something already in the grid it won't overwrite it, if that makes sense?
Re: Mousepressed overwrite?
Reply #3 - May 7th, 2009, 1:49pm
 
maybe because you call it before you call the bars... if not please post the code and ill look at it.
Re: Mousepressed overwrite?
Reply #4 - May 7th, 2009, 1:50pm
 
I tried doing that but to no avail. I'll PM you the code.
Re: Mousepressed overwrite?
Reply #5 - May 7th, 2009, 3:12pm
 
problem solved
Page Index Toggle Pages: 1