Jump to content

How to add a slider button in a HUD ?


chrixbed
 Share

You are about to reply to a thread that has been inactive for 405 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

One thing I don' think was mentioned in those other threads: If you use a prim-position method, you probably want to add some extra touchable space around the visible part of the prim (make the texture have a large transparent border, or taper the prim), or allow touching the prim behind the slider to activate the slider. If you drag something too small too fast your pointer can end up beyond the area of the widget and stop dragging it.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Just as another idea, I once used a triangular prim with the top clipped off (because I couldn't be bothered with doing any fancy textures for it anyhow), which gave me a square "knob" and two tracks (the angled sides — which look flat because HUD), and then moved the "knob" my messing with the skew.

The shape math, and handling click position on the steeply angled faces, got slightly gnarly…  but not too bad, and neither was the result.  It also doesn't have the issue of sliding off the knob (except for sideways), and you could still just click the track to set a specific position.  All with one prim and no textures, because I've got the graphic artist skills of a turnip.  (You could probably handle a little sideways slip too, with a suitably distorted track texture.)

I use a few of them for things like the adjustable speed position joggers on a camera save and restore HUD I tossed together because sometimes you have just the right scenic view (honest!) in a club, but then you wanna have a quick look around the room…

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, Bleuhazenfurfle said:

Just as another idea, I once used a triangular prim with the top clipped off (because I couldn't be bothered with doing any fancy textures for it anyhow), which gave me a square "knob" and two tracks (the angled sides — which look flat because HUD), and then moved the "knob" my messing with the skew.

The shape math, and handling click position on the steeply angled faces, got slightly gnarly…  but not too bad, and neither was the result.  It also doesn't have the issue of sliding off the knob (except for sideways), and you could still just click the track to set a specific position.  All with one prim and no textures, because I've got the graphic artist skills of a turnip.  (You could probably handle a little sideways slip too, with a suitably distorted track texture.)

I use a few of them for things like the adjustable speed position joggers on a camera save and restore HUD I tossed together because sometimes you have just the right scenic view (honest!) in a club, but then you wanna have a quick look around the room…

Seem to be interesting but I have a hard time to visualized it; are you suggesting adjusting the size of a triangle prim to make a slider effect when you touch it?

Link to comment
Share on other sites

3 hours ago, chrixbed said:

Seem to be interesting but I have a hard time to visualized it; are you suggesting adjusting the size of a triangle prim to make a slider effect when you touch it?

A box prim with taper at x:0.85, y:0.0 and varying the top sheer between x:+/-0.45 would work. The math shouldn't be too too bad, but setting shape primitive params is a bit of a pain because you have to set all of them at once.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 405 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...