0

Im not really sure if you guys do graphics.h questions here but here it goes. Im trying to find out how to get text to scroll similar to credits at the end of a movie from top to bottom but to have it repeat. I cant find online anywhere that has a function to do this. Can someone just show me how i would go about scrolling a simple message like this.

#include <iostream>
#include "graphics.h"

using namespace std;

int main()

 {
    {initwindow(1000,800);
    settextjustify(CENTER_TEXT,TOP_TEXT);
    settextstyle(4,0,8);
    outtextxy(500,200,"Scrolling Text");
    }
    while(!kbhit());
 }
2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by Ancient Dragon
0

what compiler are you using? I presume it's Turbo C on MS-DOS. What you have to do is scroll the whole screen up one line then print something on the blank line at the bottom. Wait awhile then repeat the process. It's not going to look as smooth as you see in the movies because MS-DOS windows aren't capable of that. If you want to see smooth scrolling then use a modern compiler and a graphic library such as OpenGL

Edited by Ancient Dragon

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.