So, here is my non-working attempt at it. I would appreciate it if someone could show me how it's supposed to be done. I was attempting to make this switch levels on mouse click.


#include <acknex.h>
#include <default.c>


function main()
{
screen_size.x = 800;
screen_size.y = 600;
screen_color.blue = 150;
mouse_mode = 4;
}

function begin_level()
{
while (key_any) {wait (1);}
level_load("ID.wmb");
}


PANEL* main_pan =
{
bmap = "Background.png";
pos_x = 0;
pos_y = 0;

button (518, 520, "Singleplayer2.png", "Singleplayer.png", "Singleplayer2.png", begin_level, NULL, NULL);
flags = OVERLAY | SHOW;
}