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 Discussion / stupid text function!!!!!!!

Author
Message
Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 22nd May 2003 03:13
anyway you can change the size of text and still use the print command (not "text0,0,blaa...)

help! }:>
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd May 2003 03:23
no you can't
what's wrong with the text command? you can do the same things with it (even more like changing font, size and style)

[href]www.bernardfrancois.com[/href]
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 22nd May 2003 03:24
Why would you want to use print instead of text?

If you need to make the text continue down the screen, just do a for loop:

for a=1 to 10
text 1, 15*a, "Text..."
next a

Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 22nd May 2003 03:25
you have to specify the x+y

you cant do:

print n;

that sets the cursor right after it
(cant do with text)

also:
if you want to print on one line and then on the line below it you have to do math (hmmmm.....text size is 12...my previous text was on line 8........8+12=unnecceisary thinking!

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 22nd May 2003 03:31
Print is really buggy in 3d mode. Good luck keeping your dialogue there when you try to SYNC.

You can always add a variable to your TEXT line:
text x, y, "Value of foo is: " + str$(foo) + ", so now you know."

If you want to calculate a whole line in advance:
string$ = "Value: " + str$(var1) + str$(var2)
text x, y, string$

And if you need it to be dynamic, I'd suggest writing your own print function that can handle different fonts and variable character width and such.

Wik
21
Years of Service
User Offline
Joined: 21st May 2003
Location: CT, United States
Posted: 22nd May 2003 03:33
im not doing 3d

Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 22nd May 2003 03:34
You're still going to be stuck with that monospaced console font...

freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd May 2003 03:41
you can make some functions to make it all easier, so you dont have to calculate things yourself each time

this could be a function to replace the print command



the variable space is the space between two rules of text and the variable textsize is just the size of your text, so when you set its size you could do this:



and this is how you might replace the set cursor command


offcourse you have to declare the textpos array somewhere at the beginning of your program:


[href]www.bernardfrancois.com[/href]
Ag3ntSm1th
22
Years of Service
User Offline
Joined: 13th May 2003
Location:
Posted: 22nd May 2003 04:02
here's an idea...
set cursor to make it print to just the bottom line on the screen. then copy that image each time you print to there. now anytime you want to display it bigger, somewhere else, put image and scale it to your liking. you also have the freedom of any other sprite options if this way suits you.

"The secret to creativity is knowing how to hide your sources." - Einstein
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd May 2003 14:51
you could try it but I think this is very slow, and you still can't change your text font...

[href]www.bernardfrancois.com[/href]
Pricey
22
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 22nd May 2003 20:42
yes you can

I don't know i can't tell!
I push the button and run like hell!
freak
22
Years of Service
User Offline
Joined: 20th Jan 2003
Location:
Posted: 22nd May 2003 20:50
how? I thought you couldn't change the font of the text that appears when you use the print command

[href]www.bernardfrancois.com[/href]
Hell IVIonkey
22
Years of Service
User Offline
Joined: 1st Apr 2003
Location: Outer Limits
Posted: 22nd May 2003 22:58
Freak's right. PRINT's limitations is the original problem anyhow, so how would using PRINT at the bottom of the screen help?

Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 22nd May 2003 23:04
If you can't be arsed with working out how far down you have to move your next line, then I really don't have a clue how you're going to stick with programming at all !

cuRant PRogekt: a three-de map editer
Why the hell'd you ask me for crying out loud!?!
Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM

Login to post a reply

Server time is: 2025-05-18 08:29:03
Your offset time is: 2025-05-18 08:29:03