set() and reset() are your friends
Code:
PANEL* start_pan =
{
layer = 10;
pos_x = 20;
pos_y = 60;
button (22,22,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,25,4,start_font,10,start_button);
button (22,62,"DS_ss_button_1.bmp","DS_ss_button_2.bmp","DS_ss_button_1.bmp",load_start,NULL,NULL);
digits (50,65,4,start_font,10,load_button);
digits (10,30,4,start_font,10,startpan_hide);
flags = VISIBLE;
}
function main()
{
video_mode = 7;
mouse_map = mouse_bmp;
mouse_mode = 2;
level_load("mainmenu.WMB");
wait (1);
/////////////////////////////////// camera set for mainmenu
vec_set(camera.x,vector(-123,-123,-103)); // place the camera at X,Y,Z
camera.pan = 77;
camera.tilt = 15;
camera.roll = 0;
set(start_pan, VISIBLE);
while (1)
{
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait (1);
}
}
function load_start()
{
camera.x = 200;
level_load("level_start.WMB");
reset(start_pan, VISIBLE);
wait(1);
}