Well, to order them requires you to search through the entire list again and again, finding the lowest ordered. So, it's gonna take alot of iterations. But, you could take an array of the type handles. Get the order number and plug the handle of the type into the array.means you'd only go through the list once. eg:
then you would go through the array and access the type in the order there to be drawn in. Thing is, you'd need to have a variable holding the number of gadgets, because of the static size of the array.
It's getting late and i can't remember how exactly the object handle thing works. I'll have a look tommorow, but the code above should work and be fairly quick. Quicker then cycling through the types again and again.
for g.gadget = each gadget array(g\order) = handle g.gadget next
then you would go through the array and access the type in the order there to be drawn in. Thing is, you'd need to have a variable holding the number of gadgets, because of the static size of the array.
for loop = 0 to number_of_gadgets-1 g.gadget = object array(loop) drawimage g\gadget_image next
It's getting late and i can't remember how exactly the object handle thing works. I'll have a look tommorow, but the code above should work and be fairly quick. Quicker then cycling through the types again and again.