Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Serious User
darkinferno  Offline 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...


Code:
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: darkinferno] #279572
07/18/09 09:09
07/18/09 09:09
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline
User
the_mehmaster  Offline
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Have you got :
Code:
vec_set(mouse_pos,mouse_cursor);


Executing every frame?

Also you need mouse_mode set to 1.

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 Offline
Expert
EvilSOB  Offline
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
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

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

Code:
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: MrGuest] #279612
07/18/09 13:08
07/18/09 13:08
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline OP
Serious User
darkinferno  Offline OP
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
this sooo annoying, i have checked all the above over and over again and no matter what i still cant move the knob, such a pain, i guess something else in the code must be affecting it but what?

nothing is updating temp_variable, i only created it for testing purposes and its not in a while loop....

@MrGuest, what do you mean by saying make sure that the background is 300px or more?

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 Offline
Expert
EvilSOB  Offline
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 Offline OP
Serious User
darkinferno  Offline 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 Offline
Expert
EvilSOB  Offline
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

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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