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 / Settings text priority?! Darn sprites in the way of text...

Author
Message
Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 27th Jun 2013 14:19 Edited at: 27th Jun 2013 14:21
So, I\'ve been trying to fix this annoying problem for absolutely too long. Hopefully the solution is simple and I\'m just overlooking something. Anyway, I\'ve got some text being drawn, however, a sprite in a previous cycle is for some reason being drawn after it (being drawn over the text)... Now this is a problem since the sprite is a background...

background code


Text setup code (plus the call of the sprite creation)


Save function (where text is being drawn)


A simplified version of how my program does its setup (the background sprite is drawn within the \"_SETTINGS_SYSTEM_SETUP\" sub)


Now, I know you can set the priority of sprites, I\'ve tried doing so with the background sprite to no avail.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jun 2013 14:48 Edited at: 27th Jun 2013 14:50
You can make your text into sprites, or you can make your sprites into plains. A background as a sprite is a bit strange anyway.

Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 27th Jun 2013 15:35
Ok thanks, the background is just going to be shown whilst a save is being loaded. it is only shown breifly.

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 27th Jun 2013 15:37

thats the easiest way..
just paste sprite at the loop before you want to draw text and dont forget to hide your sprite and SET sprite after the creation.

Stream SnifferTools/Plugins/Models/Games and more!
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 27th Jun 2013 17:14
In addition to Sergey K's method; you can also draw them all using Matrix1:

Quote: "DRAW SPRITES

Description

This command is used to force the immediate drawing of sprites to the display.

For best effect, you should used the DRAW SPRITES MANUAL command to disable drawing of sprites during SYNC.
These commands combined allow you to draw sprites anywhere in your draw sequence (for example, between one 2D operation and another)."


Paronamixxe
AGK Bronze Backer
14
Years of Service
User Offline
Joined: 10th Feb 2012
Location: Sweden
Posted: 27th Jun 2013 18:27
AA thanks all

Login to post a reply

Server time is: 2026-07-07 00:50:20
Your offset time is: 2026-07-07 00:50:20