I am new to programming and starting out with Lite-C here (even though I have done scripting in games). The first thing I am doing is pretty much starting a small game starting with the main menu and here is the first problem I have encountered..
What's wrong here?
#include <acknex.h>
#include <default.c>
///////////////////////////////
BMAP* image_HomeBackground = "images\menu_home\Background.jpg"; // Main menu background with logo
BMAP* image_Butt_QuitNormal = "images\menu_home\Quit_Normal.png"; // Button = Quit (Normal)
BMAP* image_Butt_QuitOver = "images\menu_home\Quit_Over.png"; // Button = Quit (Over)
BMAP* image_Butt_QuitClicked = "images\menu_home\Quit_Clicked.png"; // Button = Quit (Clicked)
function main()
{
video_mode = 7;
screen_color.blue = 150;
}
function quit_program()
{
while (key_any) {wait (1);}
sys_exit(NULL);
}
PANEL* menu_background =
{
bmap = "image_HomeBackground";
pos_x = 0;
pos_y = 0;
layer = 1;
button (364, 500, "image_Butt_QuitClicked", "image_Butt_QuitNormal", "image_Butt_QuitOver", quit_program, NULL, NULL);
flags = OVERLAY | VISIBLE;
}
The background is obviously, the background. It doesn't need any interaction, the button however does. The problem is that when I run the program, I can see the background and the button image just fine, except for the fact that the whole screen is a button and that too, not clickable (no other image state for the button is shown as well). I even tried setting button to layer 2 (actually, I don't need Overlay part, png are transparent and show up fine without it as well).
I am following the Lite-C workshop btw, and I used the same images in the Workshop 6 script and they work fine, show up fine with all the image states. The same code in my own script however fails to work properly. So what am I doing wrong here?
Thanks.
PS: Using 7.60 trial.