>>>>for lite-c.. for c-script i dont remember lol i un-learned that already.
//mode 0= fade in, mode=1 fade out
function panel_fade(PANEL* p,int mode,int speed){
int check;
p.alpha=100*mode; //assume the init value as a the mode is zero or 1
set(p,TRANSLUCENT);
while(p && check==0){
check=1; // turn 1, as finished loop
if(mode==0 && p.alpha<100){p.alpha+=speed*time_step; check=0;}
if(mode==1 && p.alpha>0){p.alpha-=speed*time_step; check=0;}
wait(1);
}
}
to call the action you just do:
panel_fade("panel_here" , 0,speed );
example: panel_fade(button,1,4);
i recommend the speed to be between 1 and 25.. [*]if you are assigning this to the button you, the button you press is passed as 1st parameter , but the speed i dont know if you can send it like that. if you are assigning this to the button you, the button you press is passed as 1st parameter , but the speed i dont know if you can send it like that.