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 / New Line In Text?

Author
Message
Phantom887
16
Years of Service
User Offline
Joined: 13th Sep 2009
Location:
Posted: 15th Jul 2011 08:45
I've tried searching around, but I can't for my life figure out how to make the text in a print command go to a new line. It keeps running off of my screen.
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 15th Jul 2011 14:20
What are you printing that is so large? I'm sure you could use a combination of string and text commands to size it down and to get it onto multiple lines.

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 15th Jul 2011 15:01
Check out Advanced 2D for text that auto-wraps into a box that you set limits for.

Aside from that, each new PRINT command automatically puts text on the next line below it. So, you could separate your text into multiple PRINT commands. Just don't put a semi-colon on the end, because the semi-colon causes a concatenation instead of a new line.

JackDawson
14
Years of Service
User Offline
Joined: 12th Jul 2011
Location:
Posted: 15th Jul 2011 15:09
Hey there Phantom.. I understand where your coming from.. keep in mind this is not like IDE programing languages that have "controls" or containers for everything. Its not OOP programing. Meaning you have to actually make your own from scratch. You can write your own routine that if it gets to a certain length it will auto-wrap itself. But again, this is all designed by you.

This is more of a 3D engine IDE more then anything. Which is why its perfect for game making. I have used all kinds of IDEs and I know a lot of languages over the past decades of programming, and one thing I like about DarkBasic Pro is the ability to not have to write the code out to drive the graphics card. Oh man.. I hated that in assembly language.. lol

And what Hodgey is referring too is the size of the text.. or Font your using. You can adjust that as well. ( Which you probably already know this stuff ) But one of the fonts I use is large and so I literally have to write my own routine to wrap the text around if it gets too long.

So I hope this helps bro.

"If you can sing that high, you must have been kicked in the crotch a little too hard."
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 15th Jul 2011 16:11
You can use this:
WickedX
17
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 15th Jul 2011 16:39
You don’t need to put all the text in one print statement. Print will send a carriage return automatically. If you don’t want this carriage return use a semicolon at the end of the print statement and the text will continue on the same line.
KISTech
18
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Jul 2011 19:14


You could of course make it a little prettier and make the break occur at a space, but this should at least give you an idea or two.

Phantom887
16
Years of Service
User Offline
Joined: 13th Sep 2009
Location:
Posted: 15th Jul 2011 19:22
Thanks for the help, everyone!
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 16th Jul 2011 03:50
although I never had a problem but max-p solution was pretty good.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Jul 2011 00:27

Login to post a reply

Server time is: 2026-07-10 20:58:47
Your offset time is: 2026-07-10 20:58:47