Having trouble with scrolling GUI

Started by Erenan, Fri 03/06/2005 04:09:01

Previous topic - Next topic

Erenan

I've managed to get the GUI to scroll down when the mouse is at the top of the screen, but when the image is scrolling it has some ugly unwanted colors on it. Then, they disappear after the GUI stops. I've searched the manual and the forums for this, and other people seem to be doing the same thing I am, but they apparently don't have this problem. I can't find any other information on what might be causing this. What's going on? :-\

My image:



When scrolling it looks like this:



Here's my code, in case that helps:

Code: ags
if(IsGUIOn(2)==0 && mouse.y < 4) {
Ã,  GUIOn (2);
Ã,  int gy = -40;
Ã,  while(gy < 0){
Ã,  Ã,  gy = gy + 5;
Ã,  Ã,  SetGUIPosition (2,110,gy);
Ã,  Ã,  Wait(1);
Ã,  }
}
Ã,  
Ã,  if(IsGUIOn(2)==1 && mouse.y > 42){
Ã,  Ã,  int gy2 = 0;
Ã,  Ã,  while(gy2 > -40){
Ã,  Ã,  Ã,  gy2 = gy2 - 5;
Ã,  Ã,  Ã,  SetGUIPosition (2,110,gy2);
Ã,  Ã,  Ã,  Wait(1);
Ã,  Ã,  }
Ã,  Ã,  GUIOff(2);
Ã,  }Ã,  


I don't understand what the problem is. I thought that maybe it had to do with making the GUI's y value less than zero, but putting it all in positive values didn't seem to change anything.
The Bunker

Gilbert

It's probably because you choosed "GUI greys out" option (I think it's default) for "When interface disabled:" in the game's setting. During the Wait()'s interface controls are blocked, so it's considered as "disabled" and alternative black dot pattern will be drawn on top of it to make it "greyed out".

Just change that option to "GUI unchanged".

Erenan

D'oh! Is that all it was? Thanks so much! ;D

Geez. I tried just about everything else. How could I not see that setting? ::)
The Bunker

SMF spam blocked by CleanTalk