|
3 registered members (Quad, TipmyPip, pr0logic),
2,041
guests, and 4
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Starting with Lite-C (using Workshop, need help please)..
#243363
12/29/08 17:14
12/29/08 17:14
|
Joined: May 2008
Posts: 121
ortucis
OP
Member
|
OP
Member
Joined: May 2008
Posts: 121
|
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.
Last edited by ortucis; 12/29/08 17:15.
|
|
|
Re: Starting with Lite-C (using Workshop, need help please)..
[Re: ortucis]
#243381
12/29/08 18:39
12/29/08 18:39
|
Joined: Oct 2008
Posts: 67
Crypton
Junior Member
|
Junior Member
Joined: Oct 2008
Posts: 67
|
To click on panels and buttons you need to set mouse_mode I had probably the same thing when I tried to remake panels by heart.
New into Gamestudio and eager to learn it.. Stuff and games done in 2D: LINK
|
|
|
Re: Starting with Lite-C (using Workshop, need help please)..
[Re: ortucis]
#243398
12/29/08 20:14
12/29/08 20:14
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
Look in the workshops, the cursor image is in there and the tool-tip code you will need to write your own code.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|