Hi, Ive created an image (im new to this so im starting small). Im now trying to add a button to it to end the program. When i click it the program ends like i want it to, but the image doesnt change.
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
BMAP* firebackground = "awesome-fire-dragon-ablaze.jpg"; // dragon fire background with button on it
PANEL* first_pan = // my first panel
{
pos_x = -40;
pos_y = 0;
layer = 1;
bmap = firebackground;
flags = OVERLAY | VISIBLE;
}
BMAP* pngRobot = "LDDScreenShot1.png"; // robot in foreground
PANEL* second_panel =
{
pos_x = -270;
pos_y = -100;
layer = 2;
bmap = pngRobot;
flags = OVERLAY | VISIBLE;
}
PANEL* button_panel = //panel for button
{
pos_x = 30;
pos_y = 0;
layer = 3;
button (270, 0, "stopclicked.jpg", "stopnormal.jpg", "stopnormal.jpg", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}
/////////////////////////////////////////////////////////////////////
function main()
{
video_mode = 7;
screen_color.blue = 150;
mouse_mode = 4;
}
function quit_program()
{
sys_exit(NULL);
}
Last edited by gamingfan101; 06/11/09 01:10.