1 registered members (AndrewAMD),
684
guests, and 5
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
button wont work
#280839
07/24/09 12:01
07/24/09 12:01
|
Joined: Jul 2009
Posts: 40
enrike
OP
Newbie
|
OP
Newbie
Joined: Jul 2009
Posts: 40
|
hi
I must be doing really stupid but i cannot make my button respond to a click. This is the code
//// function test(button_number,panel) { printf("on"); }
PANEL* pTest = { pos_x = 10; pos_y = 10; size_x = 150; size_y = 300;
button(10, 10, "boton2.bmp", "boton1.bmp", NULL, test, NULL, NULL); red = 128; green = 128; blue = 128; flags = LIGHT | VISIBLE; } ///
The button is there but it never calls the test() function, also it never changes to bmapOn. I tried setting panel and button possition to 0 but does not work. Also I defined the function like this but it did not help. function test() { printf("on"); }
i cannot really see what i am doing wrong. thanks
enrike
Last edited by enrike; 07/24/09 12:02.
|
|
|
Re: button wont work
[Re: Widi]
#280846
07/24/09 12:21
07/24/09 12:21
|
Joined: Jul 2009
Posts: 40
enrike
OP
Newbie
|
OP
Newbie
Joined: Jul 2009
Posts: 40
|
no i am opening a window with no borders but not fullscreen. I have tried to open different type of windows and it never worked.I also tried to set a global variable from the function and it never change its value. I changed the bitmaps to pcx as well, and set mouse_mode to different values. I am using Vindows Vista with A7 version 7.02.4
Last edited by enrike; 07/24/09 12:24.
|
|
|
Re: button wont work
[Re: enrike]
#280849
07/24/09 12:26
07/24/09 12:26
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
|
|
|
Re: button wont work
[Re: enrike]
#280852
07/24/09 12:31
07/24/09 12:31
|
Joined: Aug 2007
Posts: 1,922 Schweiz
Widi
Serious User
|
Serious User
Joined: Aug 2007
Posts: 1,922
Schweiz
|
|
|
|
Re: button wont work
[Re: Widi]
#280853
07/24/09 12:32
07/24/09 12:32
|
Joined: Jul 2009
Posts: 40
enrike
OP
Newbie
|
OP
Newbie
Joined: Jul 2009
Posts: 40
|
really??? wow! thats a nasty bug then. I just tried with latest demo version and does the same. i mean it does not work either
Last edited by enrike; 07/24/09 12:34.
|
|
|
Re: button wont work
[Re: Widi]
#280858
07/24/09 12:46
07/24/09 12:46
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
mouse_mode must be greater than zero (or something like that)
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: button wont work
[Re: EvilSOB]
#281409
07/27/09 06:30
07/27/09 06:30
|
Joined: Jul 2009
Posts: 40
enrike
OP
Newbie
|
OP
Newbie
Joined: Jul 2009
Posts: 40
|
just tried with layer=5 and mouse_mode = 1 and 3 and it does not work either. This is a simple version of my script. It does not work for me.
#include <acknex.h> #include <default.c>
var watch ;
function test() { watch = 1234; printf("on"); }
PANEL* pTest = { pos_x = 10; // CONTROL PANEL POSITION IN WINDOW pos_y = 10; size_x = 150; size_y = 300; layer = 2;
button(10, 10, "boton2.bmp", "boton1.bmp", NULL, test, NULL, NULL); red = 128; green = 128; blue = 128; flags = LIGHT | VISIBLE; }
function main() { video_mode = 6; while(1) wait(1); }
Last edited by enrike; 07/27/09 06:36.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|