Author Topic: Text Wrapping and Scrolling Routine  (Read 2382 times)

0 Members and 1 Guest are viewing this topic.

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Text Wrapping and Scrolling Routine
« 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.
In-progress: Graviter (...)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Text Wrapping and Scrolling Routine
« Reply #1 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)

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Text Wrapping and Scrolling Routine
« Reply #2 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?

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Text Wrapping and Scrolling Routine
« Reply #3 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.
In-progress: Graviter (...)

SirCmpwn

  • Guest
Re: Text Wrapping and Scrolling Routine
« Reply #4 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.