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.

Newcomers DBPro Corner / Removing text? Simple or what?

Author
Message
JJJ0han
17
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 6th Oct 2007 06:28
This question is making me feel kinda stupid for asking due to the simplicity, but anyway, I've been looking for a way to remove text.

I've got a load screen, and I need a way to update the percentage text without using a loop. I've tried using a "for" command, but all it's doing writing the text over the old one instead of replacing it.

Is there anyway to replace or remove text? I've tried doing a search but my search results are clogged with "texture" .
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 12:38 Edited at: 6th Oct 2007 12:39
Simple? Yes.

You can't 'undraw' something, but you can draw over it again with what you previously had in that position.

One way is to simply redisplay the whole background again, but then you need to redraw everything else that you need to keep displayed.

If you don't want to do a full redraw each time, then use GET IMAGE once at the start for the area you want to write to, then PASTE IMAGE back to the same area just before you write the new text.

This example shows the second method:


Hold down the spacebar to increase the percentage.

Image = Texture, so that's why your search results were clogged. They were actually posts that you needed to read

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
JJJ0han
17
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 6th Oct 2007 15:09
Awesome. Now I need to figure out how to make to make the progress bar show the progress depending on everything it has loaded .

And maybe a "loading blahblahblah" (objects for example) thing, but I'll just add another line for that.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Oct 2007 15:54
Simple method - count the files and calculate the percentage:

(Number of files loaded + 0.0) / (Total number of files) * 100.0

Utility plugins collection and
http://www.matrix1.demon.co.uk for older plug-ins and example code
JJJ0han
17
Years of Service
User Offline
Joined: 4th Oct 2007
Location: Brisbane, Australia
Posted: 7th Oct 2007 03:43
I'm getting a bit lost now.

I've managed to get the content loading, but how exactly do I count the files so it uses that in the percentage bar?

Here's the loading code I have, excuse the mess:

Login to post a reply

Server time is: 2024-11-25 11:17:41
Your offset time is: 2024-11-25 11:17:41