Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Setting the draw order of locked objects?

Author
Message
Alaror
15
Years of Service
User Offline
Joined: 9th May 2011
Location:
Posted: 12th Oct 2011 17:57 Edited at: 12th Oct 2011 18:37
Working on a GUI at the moment for my game using object plains that have been locked to the screen. I need to be able to layer the plains so that specific elements appear above others. For example, the grey circle under the green rectangle in the image I attached should above the green rectangle. Below is the code I'm using to display the grey circle. I've tried adding/subtracting a small amount from the Z value to see if it would change what order it's drawn in but I had no success with that.

Thanks in advance for your help!





EDIT: Silly me. After trying a few different changes I found that the image number is what determines the draw order of locked objects.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 12th Oct 2011 21:21
That's true only if:
- you are using SET GLOBAL OBJECT CREATION modes of 4 or 5,
or
- you create all of your objects in object number order.

Using my FIND FREE OBJECT function, the second case will not be true after you've deleted one or more objects.

Alaror
15
Years of Service
User Offline
Joined: 9th May 2011
Location:
Posted: 13th Oct 2011 21:24
Hmmm good to know. I am using your function so that might end up being an issue. Are there any downsides to using SET GLOBAL OBJECT CREATION modes of 4 or 5?

Login to post a reply

Server time is: 2026-07-10 18:42:16
Your offset time is: 2026-07-10 18:42:16