I am making a drag and drop piece of code in Processing and it uses code similar to C++. My problem is that I cannot change the value of variables x_lim_a, x_lim_b, y_lim_a and y_lim_b inside of the if statement. Is it something to do with the positioning that is causing problems? The 4 variables are meant to change to 1000, 0, 1000 and 0 respectively but they do not please can i have some help?
Make sure the your mouse x and y values are in the scope you want them to be in. Just have it print the data to the screen. Not much that can go wrong with a simple if statement like that other than it's the wrong comparison or the data isn't what you think it is.
Not entirely sure what exactly your if statement is suppose to do. It looks like you'd want your int's to be static since right now they are local and their values are not kept after draw is returned.