I recently made a panel by following a tutorial, in this panel if I click on the "exit" button I exit the game, now what I want is to make a start button that when I click on it I go to the first level mynewgame.wmb.
how would I do that I already created a bmap startgame.pcx but how do I implement that with the mouse if I click on it I go to the first level ?
this is the code.
Quote:
var video_mode = 7; // 800x600 pixels
var video_depth = 32; // 32 bit mode
////////////////////////////////////////////////////////////////////
bmap mouse_pcx = <mouse.pcx>; // bitmap used for the mouse pointer
bmap main_pcx = <main.pcx>; // main panel
bmap quitclicked_pcx = <quitclicked.pcx>;
bmap quitnormal_pcx = <quitnormal.pcx>;
bmap quitover_pcx = <quitover.pcx>;
////////////////////////////////////////////////////////////////////
string work06_wmb = <work06.wmb>;
////////////////////////////////////////////////////////////////////
function main()
{
level_load (work06_wmb);
mouse_map = mouse_pcx;
mouse_mode = 2;
while (1)
{
mouse_pos.x = pointer.x;
mouse_pos.y = pointer.y;
wait (1);
}
}
function quit_program()
{
sleep (3);
exit;
}
//////////////////////////////////////////////////////////////////////
panel main_pan
{
bmap = main_pcx;
pos_x = 250;
pos_y = 200;
button = 250, 134, quitclicked_pcx, quitnormal_pcx, quitover_pcx, quit_program, null, null;
flags = overlay, refresh, visible;
}