ok,... stupid question here but I hope someone can help. This is a perfect example why artists should not try to program. By the way,... this is all 2d images, so when I refer to a sprite I mean a bitmap,... not a 3d sprite.
I need to be able to loop through a type backwards, or change the way I am doing things. Right now I have several sprites moving around, and each loop through, I check if they are being dragged by the mouse, then draw them at their position. All of this is working great, with one exception. I have them ordered from front to back based on y position, and when I loop through them it is from back to front (the way I want to draw them) The dragging, however grabs the first one found, which can be behind another one. This is very unnatural and I'd like to avoid it. If I could loop through them backwards it would work fine.
It would also be nice to be able to draw the sprite and check the drag in the same loop, so I don't have to loop through twice (once each way)
any ideas?
thanks.
I need to be able to loop through a type backwards, or change the way I am doing things. Right now I have several sprites moving around, and each loop through, I check if they are being dragged by the mouse, then draw them at their position. All of this is working great, with one exception. I have them ordered from front to back based on y position, and when I loop through them it is from back to front (the way I want to draw them) The dragging, however grabs the first one found, which can be behind another one. This is very unnatural and I'd like to avoid it. If I could loop through them backwards it would work fine.
It would also be nice to be able to draw the sprite and check the drag in the same loop, so I don't have to loop through twice (once each way)
any ideas?
thanks.