#include "main_menu.c"
#include "credits.c"
#include "main_game.c"
#include "endurance.c"
//then show your panel
PANEL* mainbutton1 =
{
bmap = gonorm;
pos_x = 10;
pos_y = 100;
button (0, 0, goclicked, gonorm, goover, robotswitch, NULL, NULL);
flags = OVERLAY | SHOW;
}
then in each file have an init function
so //credits.c
function credits_init(){
//do whatever you want done from here
//probably start with hiding the panel?
reset(mainbutton1, SHOW);
}