Helpmoving text?

Posts 16 of 6 · Page 1 of 1
moving text?
I'm interested in moving D3D text in my menu. (Example of what I mean will be given)
it's something similar to this:
HTML Marquee Code
I am interested in:
Continuous scrolling text
and
Text Scrolling Upwards (mostly this)
(two methods in the link above)

How do you make it so that if you navigate up your menu, a certain amount of text/features shows up in the box you draw?
ex in internet browsers:
if you scroll up or down, certain parts of the pages are covered, or hidden. That is similar to what I want to know. How do you do that in D3D?
(Let's say there's 15 features in this menu, the box is big enough to show 5 at a time.)
if I were to draw it as usual (the way I currently do), the text would overlap out the box.
Visual representation of what I wish to achieve:
-----------------
Hack1
Hack2
Hack3
Hack4
Hack5
-----------------
I press down to navigate now, Hack1 will be hidden from view and Hack6 will be shown along with 2-5.
-----------------
Hack2
Hack3
Hack4
Hack5
Hack6
-----------------
I press down again, Hack2 will be hidden from view, and Hack7 will be shown along with 3-6.
-----------------
Hack3
Hack4
Hack5
Hack6
Hack7
-----------------

How do you do this?

(Sorry if this is so redundant, I didn't have a clear way to explain this :/ )
Oh i understand what your trying to say. Its like how Black Cipher 5 was. I cant find a video of the menu but it was like a scroll box. The actual box was fairly small but the test would scroll with it. I'm not sure how to do it but it did look sick. I hope you can find out how.
y u copy bc5
Quote Originally Posted by noo4 View Post
y u copy bc5
Your shit was the shit

NOOB Tried to post this earlier, but just look up SEGnosis on UC and find his Auto Scrolling List Box menu release.
Quote Originally Posted by noo4 View Post
y u copy bc5
It look so sexy
in your render loop just iterate from currentindex-5 to currentindex instead of the beginning of the menu to the end of the menu and render those items for the listbox type deal.
now for scrolling text make the drawtext function also take a parameter time, and modulus that time elapsed against the screen width to calculate where the text should currently be. Pseudocode:
Code:
void drawscrollinghorizontal(...,long t){
//will scroll one pixel per MS
int x  = t%screenres.x;
DrawText(text,x,...);
}
now for scrolling upwards you would subtract the time%screenres.y from screenres.y for your current y position
Posts 16 of 6 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?