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 / text problem

Author
Message
RebirthAnime
21
Years of Service
User Offline
Joined: 11th Oct 2002
Location:
Posted: 16th Feb 2004 03:00
I know this is going to give someone a big laugh as to how easy it is, but I've managed to forget how to print text to wherever you want on the screen, such as printing the numbers from mousex() and mousey() to somewhere on the screen. Also..if someone knows..later on I'll need this, but anyone know how to do the lil speech boxes over a character, like on top view rpgs such as zelda or pokemon on gameboy if you've played it...thanks
BearCDPOLD
20
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 16th Feb 2004 08:14
For your first question there are a couple of solutions. Note, I'm a DarkBASIC Classic user, so these commands probably have different syntax in DB Pro.

SET CURSOR x,y

Sets cursor up, from there you can use PRINT, and it will behave as PRINT always has, starting a new line with each command.
A more precise method is:

TEXT x,y,string$

The problem with SET CURSOR is it sets the cursor to wherever you want so you can PRINT from it, but it resets to the normal PRINTing line next time you use PRINT. With TEXT you get the text where you want it right then and there.

For speech boxes you just have to write the algorithm depending on the exact effect you want. You could just make the text size bigger and use TEXT to put it all at the top of the screen, or you could use a set of bitmaps that contain the letters and use PASTE image to put them where you want it to go. It all depends on how you want it to look. Most of this stuff can be done in MS Paint.

Crazy Donut Productions
Current Project: KillZone

Login to post a reply

Server time is: 2024-09-21 21:08:43
Your offset time is: 2024-09-21 21:08:43