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.

Author
Message
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 11th May 2004 00:28
Is there a wordwrap in DPB or am I going to need to set up a routine to parse strings and count string lengths and do my own cr?

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
Surreal Studio IanG
21
Years of Service
User Offline
Joined: 21st Sep 2003
Location: Cyberspace...I think
Posted: 11th May 2004 00:36
i don't think there is a function for word wrap - i might be wrong- but i would write my own function

check the code base

PC Spec- AMD Duron 1.3Ghz, GeForce FX5200 128mb, 384MB of ram, Win XP Home SP1

Flick that switch...*BANG*...Not that one!
GameKit
22
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 11th May 2004 01:39
I think there was a "Hidden" Command in DBC called "PrintC"... If i remember correctly it worked just like print only wrapped the text...

Well... I hope I helped...

PS: There were other hidden commands like "leebamber" that would print strange random quotes of lee's on the screen.

Previously known as "Game_Creator".
The question is, why am I talking to myself? ...... And more importantly, why am I waiting for a reply?
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 11th May 2004 01:57
Quote: "PS: There were other hidden commands like "leebamber" that would print strange random quotes of lee's on the screen."


If you've ever read his DBDN diaries you would understand.

BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games. - Plus URL download, win dialogs.
Over 140 new commands
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 11th May 2004 02:21 Edited at: 11th May 2004 02:23
I didn't know there was a PRINTC command. Neat! Is it in manuals? I'll have to check when I get home. Thanks!

If I remember correctly, wasn't the DBDN membership only? I kind of remember something a couple of years ago where you paid an anual membership to access the DBDN? The codebase looks free from what I saw...So far...

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 13th May 2004 03:38
PRINTC isn't a command set that's available in DarkBASIC Pro. I guess it's just a classic command set. I ended up making a tiny function to do this for me. Thanks though.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th May 2004 15:01
wordwrap command wouldn't be too hard.

Here's a little demo I did in a few minutes. If you don't want the word to get chopped up, then you'll have to parse the string and look for spaces, commas, etc... Which could be done with my string tokenizer, found in the codebase.


"eureka" - Archimedes
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 14th May 2004 01:10
Yeah, that's pretty much what I had. Except that mine won't cut text off in the middle of a word. It recurses the string looking for a space and then splits the string at the first space left of the column length.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 14th May 2004 10:26
You also need to check for the complete width (in pixels) of a line, plus the height (due to some fonts being variable width).


The place for all great plug-ins.
Keep your friends close, and your cats even closer.
Steverino X
21
Years of Service
User Offline
Joined: 24th Aug 2003
Location: Iowa
Posted: 14th May 2004 20:27
Get my word wrap code here:
http://www.stevetiffany.com/darkbasic.html
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 2nd Aug 2004 08:10
Thanks, I'll be sure to check it out when I get home. LOL...3 Months later.

Quote: " Timesoft - Your wife is death. How? NO idea.
But it is murder. REVENGE!!!!!!!!!"

Hands down the funniest synopsis for a game ever. All your base are belong to us!
=C=
22
Years of Service
User Offline
Joined: 8th May 2003
Location: United Kingdom
Posted: 3rd Aug 2004 01:05
I will get home soon and i will post my word wrap function that creates an image box with the text wrapped in it.

there is a version in codesnips but it must be old... Give me an hour and i will upload a new one.

-------------------------------
Pointy birds, Oh pointy pointy
Anoint my head, Anointy 'nointy

Login to post a reply

Server time is: 2025-06-09 04:42:48
Your offset time is: 2025-06-09 04:42:48