|
1 registered members (AndrewAMD),
599
guests, and 3
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: button in panel only works at pos(0,0)
[Re: atlee]
#398441
04/02/12 07:46
04/02/12 07:46
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
try to modify this line: event = quitprogram(); to this: event = quitprogram; it should work 
|
|
|
Re: button in panel only works at pos(0,0)
[Re: Widi]
#398455
04/02/12 11:08
04/02/12 11:08
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
As an guess ... is "quitprogrambutt_bmp" a 32-bit image or 24bit?
If its a 32-bit, then maybe the alpha channel is allowing you to un-intentionally click 'through' the panel?
Try (temporarily) setting the bmap to a 24-bit image just as a test...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: button in panel only works at pos(0,0)
[Re: EvilSOB]
#398489
04/02/12 20:20
04/02/12 20:20
|
Joined: Mar 2009
Posts: 20
atlee
OP
Newbie
|
OP
Newbie
Joined: Mar 2009
Posts: 20
|
All bitmaps are 24-bit. Verified this. Just out of curiosity, I added this to the main bitmap panel:
button(0,0,quitprogrambutt_bmp,NULL,NULL,quitprogram,NULL,NULL)
I could move the quit program button around the main bitmap and it functioned. Unfortunately, this only works for one button and I need three on the main bitmap. If I try to add a second button, the first (quit program) button disappears and the second button makes the function call to the first button's function instead of the function assigned to the second.
Nothing in the manual on this. Anyone know what's going on? I'm using A& 7.86 lite-c.
|
|
|
Re: button in panel only works at pos(0,0)
[Re: atlee]
#398510
04/02/12 23:35
04/02/12 23:35
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Try it with your 'floating' buttons JUST like this as let us know how it goes..
PANEL* quitprogrambutt_pan = //this is the button
{
layer=35;
button(0,0,quitprogrambutt_bmp,NULL,NULL,quitprogram,NULL,NULL)
flags = SHOW;
}
And try it with multiple buttons activating a DIFFREENT function each first...
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: button in panel only works at pos(0,0)
[Re: atlee]
#398517
04/03/12 10:29
04/03/12 10:29
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
don't panic buttons work! maybe your event function is improper... if you copy that here we could help.
PANEL* ui_mainmenu_panel =
{
flags = SHADOW | OVERLAY; // | TRANSLUCENT
// alpha = 75; // if translucent panel is needed
pos_x = 0;
pos_y = 736;
bmap = panel_image_bmp; //"panel.dds";
layer = 10;
button( 10, 10, on_bmp, off_bmp, over_bmp, function_to_call ,NULL,NULL);
}
|
|
|
|