Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (firecrest, AndrewAMD, Quad), 389 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Button Click function, correct version #266356
05/17/09 16:31
05/17/09 16:31
Joined: Oct 2008
Posts: 112
N
Ness Offline OP
Member
Ness  Offline OP
Member
N

Joined: Oct 2008
Posts: 112
hullo,
i made a small example and can someone explain me ,why i cant click on the button?

Click to reveal..

function main()
{
level_load("questimage.wmb");
camera.ambient = 100;
mouse_mode = 2;
enable_mouse = 1;

}



Panel motherbutton
{
pos_X = 55;
pos_y = 55;
flags =refresh,visible,d3d;
button(0,0,motherboardpush,motherboardnormal,motherboardnormal,openmother,NULL,NULL);
}


All images are correctly imported! BUT i cant see the "clicked" Button Form,if i click! how can i disable this? AND it doesnt react to nothing if i enter code on clicked function!!!
Would be nice if someone could help me!


EDIT: DONT think that i forgot something like button_clicked() on the upper part of the code! i didnt included it!

Re: Button Click function, correct version [Re: Ness] #266410
05/17/09 22:48
05/17/09 22:48
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Are you using Lite-C?

Try : flags = VISIBLE; // capital letters for all flags.

Is your panel after main or before main?

Ottawa smile

Re: Button Click function, correct version [Re: Ottawa] #266494
05/18/09 14:05
05/18/09 14:05
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Quote:
Try : flags = VISIBLE;

Or: flags = SHOW; // if you're using GS 7.66 and up

Re: Button Click function, correct version [Re: Cowabanga] #270096
06/06/09 08:15
06/06/09 08:15
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
I think this is kind of old, but oh well.. maybe he/she still needs help. Why don't you try this:

Code:
function main()
{
level_load("questimage.wmb");
camera.ambient = 100;
mouse_mode = 2;
enable_mouse = 1;

}



PANEL* motherbutton =
{
pos_x = 55;
pos_y = 55;
FLAGS = OVERLAY | VISIBLE;
button(0,0,motherboardpush,motherboardnormal,motherboardnormal,openmother,NULL,NULL);
}


I'm assuming this is only PART of your code, right? If this is all of it, you don't have a function openmother() defined, which would obviously be a problem. I've never seen "flags = d3d" or "flags = refresh" used on panels before... ever... I suggest you download the Lite-C workshops and read through the manual as you work. It will help a LOT. laugh

EDIT: Wait, are you using C-Script or Lite-C? I re-wrote the code for Lite-C. If you're just beginning programming, you should just go ahead and learn Lite-C, instead of C-script.

Last edited by Jaeger; 06/06/09 08:24.

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