hi
1:Does exist any easy way to add vertical scrolling for a GUI? The idea is an initially hidden GUI which appears with a smooth scroll when the mouse cursor is in upper or lower position WITHOUT CLICKS .like Beneath a steel sky game.
2:I want adjust all dialogs on the under screen( like subtitle).not over head characters.
how do i get it?
Here's a snippet from the rep_ex of one of my discontinued games:
I used it to move in triangle shaped GUIs in the two upper corners but I'll try to rewrite it to a 24px high GUI at the top edge:
// this line above rep_ex:
int menu_gui_moving;
// the following inside rep_ex
int x = mouse.x;
int y = mouse.y;
GUI*g = GUI.GetAtScreenXY(x, y);
// menu GUI movement
int guiy = gMenu.Y;
if (y<25 && menu_gui_moving<1) {
menu_gui_moving = 1;
}
else if ((g==null || y>=24) && menu_gui_moving>-1) {
menu_gui_moving = -1;
}
guiy += menu_gui_moving*2;
if (guix<-24) {
guix = -24;
menu_gui_moving = 0;
}
else if (guix>0) {
guix = 0;
menu_gui_moving = 0;
}
gMenu.SetPosition(gMenu.X, guix);
The second question has been answered a couple of times already, you should find a solution using the forum search.
Thanks KhrisMUC.are this scrolling smooth?
It's going to scroll at two pixels per game loop; it looks pretty smooth, yes.
Thanks a lot