|
|
slider to mouse interaction problem
#279568
07/18/09 08:41
07/18/09 08:41
|
Joined: May 2009
Posts: 1,816 at my pc (duh)
darkinferno
OP
Serious User
|
OP
Serious User
Joined: May 2009
Posts: 1,816
at my pc (duh)
|
i have the following code, it does work because i tested it in one project, now i move it over to my third person shooter and i cant move the knob at all, it gets initialized ok, which is at 250 which would be the middle of the slider but no matter what i do and how i set mouse_mode i cant get it to move via the mouse...
var temp_variable=250;
PANEL* changeslide =
{
bmap = "var_sliderBg.bmp";
slider (0, 0, 300, "var_sliderKnob.bmp", 0, 500, temp_variable);
flags = OVERLAY | VISIBLE;
}
so am just wondering if anyone has had this problem and know what could be causing it
|
|
|
Re: slider to mouse interaction problem
[Re: the_mehmaster]
#279585
07/18/09 10:33
07/18/09 10:33
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Make sure you donr actidentally have another function somewhere constantly resetting "temp_variable" to 250.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: slider to mouse interaction problem
[Re: EvilSOB]
#279591
07/18/09 11:31
07/18/09 11:31
|
Joined: Jul 2008
Posts: 1,178 England
MrGuest
Serious User
|
Serious User
Joined: Jul 2008
Posts: 1,178
England
|
mouse_mode 4 saves you using vec_set(mouse_pos.... even though it lies in teh manual about not using force
var temp_variable=250;
PANEL* changeslide =
{
bmap = "var_sliderBg.bmp";
hslider (0, 0, 300, "var_sliderKnob.bmp", 0, 500, temp_variable);
flags = OVERLAY | VISIBLE;
}
void main(){
mouse_mode = 4;
}
works for me make sure your background is atleast 300px wide other than that... what Evil said
|
|
|
Re: slider to mouse interaction problem
[Re: darkinferno]
#279616
07/18/09 13:12
07/18/09 13:12
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
I think he means make sure the panels size_x, size_y is larger than the area used by your sliders entire range. If the slider is "hanging over" the edge of the panel, it WILL still get drawn, but it wont react.
Also, make sure you dont have any invisible/transparent panels "above" it.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: slider to mouse interaction problem
[Re: EvilSOB]
#279620
07/18/09 13:27
07/18/09 13:27
|
Joined: May 2009
Posts: 1,816 at my pc (duh)
darkinferno
OP
Serious User
|
OP
Serious User
Joined: May 2009
Posts: 1,816
at my pc (duh)
|
ahhhhhh... oh yes, thank you so much EvilSOB, i didnt even think of this:
Also, make sure you dont have any invisible/transparent panels "above" it.
that line was the miracle worker, all my hud elements were above it, i honestly did not think of this, changing the layer number worked, thanks alot guys, now i can continue
|
|
|
Re: slider to mouse interaction problem
[Re: darkinferno]
#279631
07/18/09 14:27
07/18/09 14:27
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
hehe, easy fumble to make.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
|