Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Ayumi, howardR), 499 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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