hi,
i've created a game menu and it looked well. but everytim i load the game, the main menu is still visible but the game is running. any ideas please?
here is d code:
#include <acknex.h>
#include <default.c>
#include "level2code.c"
var speed = 50;
BMAP* mouse_pcx = "mouse.pcx"; // bitmap used for the mouse pointer
function main()
{
//video_screen = 1;
screen_size.x = 800;
screen_size.y = 600;
mouse_map = mouse_pcx;
mouse_mode = 4;
}
function instruction_program()
{
while (key_any) {wait (1);}
level_load("instruct.c");
//sys_exit(main_pan);
}
function load_program()
{
while (key_any) {wait (1);}
level_load("level2maze.wmb");
//sys_exit(main_pan);
}
function exit_program()
{
while (key_any) {wait (1);}
sys_exit(NULL);
}
PANEL* main_pan =
{
layer = 30;
bmap = "pacmantittle2.jpg";
pos_x = -90;
pos_y = 0;
button (390, 250, "player_OVER.pcx", "player_OUT.pcx", "player_OVER.pcx", load_program, NULL, NULL);
button (400, 290, "lan_OVER.pcx", "lan_OUT.pcx", "lan_OVER.pcx", load_program, NULL, NULL);
button (380, 330, "instructions_OVER.pcx", "instructions_OUT.pcx", "instructions_OVER.pcx", instruction_program, NULL, NULL);
button (395, 370, "settings_OVER.pcx", "settings_OUT.pcx", "settings_OVER.pcx", exit_program, NULL, NULL);
button (390, 410, "about_OVER.pcx", "about_OUT.pcx", "about_OVER.pcx", exit_program, NULL, NULL);
button (395, 450, "exit_OVER.pcx", "exit_OUT.pcx", "exit_OVER.pcx", exit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}
thank you!:)