Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/17/26 17:02
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (AndrewAMD, Live, alibaba, Martin_HH), 30,750 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
can't click a panel button #338586
08/19/10 11:54
08/19/10 11:54
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
Hi
I'm using Comm v7.86 in windows XP
Started to use the PANEL's buttons today and is not working,
used some samples already without any luck. The panel shows ok
with the button images. Used events, functions, combination of flags and nothing is working with the buttons.
Any help or reference is appreciated. Thanks

function DoReset() { ... }

PANEL* menu_pan =
{
pos_x = 10;
pos_y = 340;
button(0, 0,"button_new.bmp","button_new.bmp",NULL,DoReset,NULL,NULL);
flags = VISIBLE;
event = MenuEvent;

}
//...
function main() {
enable_mouse = 2;
set(menu_pan, ENABLE_CLICK);
//...

Re: can't click a panel button [Re: monchito] #338587
08/19/10 12:01
08/19/10 12:01
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
you have to put this in your main loop:

Code:
vec_set(mouse_pos, mouse_cursor);




3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: can't click a panel button [Re: monchito] #338588
08/19/10 12:06
08/19/10 12:06
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67"...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67"...
@edit: someone was faster.... -.-

Try this:

Code:
PANEL* menu_pan =
{
pos_x = 10;
pos_y = 340;
button(0,0,"button_new.bmp","button_new.bmp","button_new.bmp",DoReset,NULL,NULL);
layer=900; //to be sure nothing is above the panel
flags = VISIBLE;}

function DoReset() { ... } //You can write this function under the panel-definition also

//...
function main() {
mouse_mode=2;
mouse_map=bmap_create("button_new.bmp");
while(1)
{
vec_set(mouse_pos.x,mouse_cursor.x);
wait(1);}
//...



I do it that way, if I want to create a button on a panel.
If this isn't working also, try to use different bitmaps for the three button-states.
Hope I could help.


Hilf mir, dir zu helfen!
Re: can't click a panel button [Re: painkiller] #338589
08/19/10 12:07
08/19/10 12:07
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: painkiller
you have to put this in your main loop:

Code:
vec_set(mouse_pos, mouse_cursor);

would need to be in a while loop, though unnecessary

just use to update mouse position
Code:
mouse_mode = 4;



Re: can't click a panel button [Re: monchito] #338630
08/19/10 19:23
08/19/10 19:23
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
Now its working ok. Thanks to all.


Gamestudio download | 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