Calculator Community => TI Calculators => TI-BASIC => Topic started by: Eeems on July 08, 2009, 09:49:29 pm

Title: Text Wrapper
Post by: Eeems on July 08, 2009, 09:49:29 pm
well since I haven't really done much except release this on ticalc, I'll release this here, this is one of my past projects, a text wrapper for the graphscreen
I'll post the code later, and maybe add it to the downloads later, but I just wanted some people to test this and let me know how good they think it is
Title: Re: Text Wrapper
Post by: DJ Omnimaga on July 08, 2009, 10:01:33 pm
i dont really get what it does, could u explain in further details what it does?
Title: Re: Text Wrapper
Post by: Iambian on July 08, 2009, 10:22:46 pm
Looking good. DJ Omnimaga, the purpose of the routine seems to be to allow text wrapping inside of a textbox placed anywhere on the screen. The routine would be used in conjunction with a box drawing routine. That way, you wouldn't have to worry about figuring out how much text would go on a single line. Not only will this ease programming woes, but it would also save space for each line delimit you had.

Do correct me if I'm wrong (horribly).

The next logical step is word-wrapping! The inString() function is *very* useful for that task, though it's been forever since I've done anything like that. The most recent thing I've ever done with it involved writing an installer for RoL3...

Keep up teh good works.

EDIT: Also, if I was right about the whole boxy thing, I think it might've done the screenshot justice to have a box to show with it. I've written... DANG! I actually HAD a word-wrapping routine stuffed somewhere in my backups! The backup that TiLP ate up >.<
Title: Re: Text Wrapper
Post by: Eeems on July 08, 2009, 10:56:16 pm
lol, yes you are right, it is for wrapping text in a box...the only reason I didn't have a box was because I didn't have a way to make the box with the wrapper, and I had made the box a while ago, but hmm, I should do that
how big was your routine? mine is just over 300 bytes
Title: Re: Text Wrapper
Post by: Iambian on July 09, 2009, 07:17:12 pm
I think the routine was around 800 bytes to perform box drawing, text wrapping, AND have a little moving arrow at the bottom of the screen to indicate that there's more text. The only problem is that it could only handle line lengths of 16 chars wide. Something about the math that went wild.
Title: Re: Text Wrapper
Post by: noahbaby94 on July 09, 2009, 07:23:20 pm
This may interest you it's similar except it separates it word for word.
Press down to continue.
Title: Re: Text Wrapper
Post by: Eeems on July 09, 2009, 07:23:34 pm
ah :/
well mine just clears the box, or displays the text, the wrapping only wraps letters, not words, but with a few more lines of code I'm sure I could make it work
I played around with the code so that clearing will make a box around the area instead, since I can use Celtic III for the one I'm using for my game, so it works better.
speaking of which, I need to get to work on it....
also, my text wrapper is currently at 265 bytes (the one I am using for my game)...and this is with the change of code for the clearing, and with a few changes to make it work properly


oh yeah I forgot to mention in my first post that this wrapper will correctly wrap lowercase w's and m's (they are once pixel bigger then normal letters) as well as spaces and other smaller symbols

EDIT: nice ninga there noah, I'll take a look thanks :)
Title: Re: Text Wrapper
Post by: Iambian on July 09, 2009, 07:29:24 pm
If only you were using ASM, I'd throw a bone and give you a full-screen wordwrapping routine that correctly wraps any text you throw at it. It's the same one being used in CaDan.

But, no. I haven't the energy to do something like that in BASIC. Another idea for Celtic III. (edit: currently low on caffeine)
Title: Re: Text Wrapper
Post by: Eeems on July 09, 2009, 07:32:25 pm
lol, well thanks, my program does do full screen btw, and I can probably use this prog that noah gave fact I printed off the code, and I'm going to modify it now