Do I have a z-order problem?

BlitzMax Forums/BlitzMax Programming/Do I have a z-order problem?

JoJo(Posted 2005) [#1]
I have 20 objects drawn on the screen and when I pick up and object by clicking on it with the mouse and dragging it across the screen, it goes behind some of the objects and in front of the others.

How would I go about correcting this?

What I would like to do is whatever piece that I have hold of, I would like it to appear in front of all other objects.

I hope I'm clear.


GW(Posted 2005) [#2]
Place all your objects into a linked list when you create them.
whenever you click on an object, move it to the end of the linked list.
when drawing all your objects, loop through the list from front to back ensuring that the picked image gets drawn last.