Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: leafy on January 23, 2011, 11:13:43 pm

Title: Text Wrapping and Scrolling Routine
Post by: leafy on January 23, 2011, 11:13:43 pm
I was just wondering if anybody created one, because I can't find one on this here intarwebs. I'm going to use it to incorporate dialog into some of my programs.
Title: Re: Text Wrapping and Scrolling Routine
Post by: Munchor on January 24, 2011, 07:39:39 am
I was just wondering if anybody created one, because I can't find one on this here intarwebs. I'm going to use it to incorporate dialog into some of my programs.

I think there is a routine for scrolling text, here it is, I think it was Quigibo who made it:

Code: [Select]
Lbl TX
->B:~1->A
ClrHome
While {A+1->A+B}
Disp >Frac
Pause 160
ReturnIf getKey
End
Pause 3000
Return

Now, here's me using it:

Code: [Select]
"THIS TEXT WILL BE SCROLLING DOWN, AND IT WILL BE WRAPPED SO IT FITS THE SCREEN. HOWEVER, SOME WORDS MAY BE CUT HALF"->Str1
Str1sub(TX)
Title: Re: Text Wrapping and Scrolling Routine
Post by: squidgetx on January 25, 2011, 07:40:38 pm
optimized:
Code: [Select]
("THIS TEXT WILL BE SCROLLING DOWN, AND IT WILL BE WRAPPED SO IT FITS THE SCREEN. HOWEVER, SOME WORDS MAY BE CUT HALF")
sub(TX)

@leafiness: are you interested in wordwrapping, or is having some words cut in half acceptable?
Title: Re: Text Wrapping and Scrolling Routine
Post by: leafy on January 25, 2011, 09:16:12 pm
I was actually thinking of using the smaller text - the Text( function rather than Disp. I'm okay with words getting cut off, though.
Title: Re: Text Wrapping and Scrolling Routine
Post by: SirCmpwn on January 29, 2011, 01:53:43 pm
I've made word wrapping routines before, but not in Axe.  I'll look into it and get back to you.