Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/19/24 18:45
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, kzhao, 7th_zorro), 739 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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
O
ortucis Offline OP
Member
ortucis  Offline OP
Member
O

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?
Code:
#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
C
Crypton Offline
Junior Member
Crypton  Offline
Junior Member
C

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: Crypton] #243384
12/29/08 18:59
12/29/08 18:59
Joined: May 2008
Posts: 121
O
ortucis Offline OP
Member
ortucis  Offline OP
Member
O

Joined: May 2008
Posts: 121
Yup, it was the mouse mode problem. Thanks a lot (was giving me a headache on first step itself :P).


Click to reveal.. (warning)
Re: Starting with Lite-C (using Workshop, need help please).. [Re: ortucis] #243394
12/29/08 19:52
12/29/08 19:52
Joined: May 2008
Posts: 121
O
ortucis Offline OP
Member
ortucis  Offline OP
Member
O

Joined: May 2008
Posts: 121
Umm, new questions. I can't seem to find the information on doing two things:

1) Display a mouse over text (how do I use Strings/Text object for a button?) on a button mouse over. Also, is there a way to show a tooltip (like normal windows tips, except in-game and over a button).

2) Change the cursor to another image on mouse over.

Maybe I'll find a solution as I continue going through the workshop.


Click to reveal.. (warning)
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 Offline
Serious User
Blade280891  Offline
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"

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1