Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Scooting HUDs out of the way

Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
06-15-2006 11:46
I'm working on a HUD attachment, but want to minimize the amount of screen that it takes up, and thought the best way to do this is with an expand/collapse feature.

I'm thinking that:
llSetPos(llGetpos() + <x,y,z>;)

would be the best option, but does this work on HUDs? And (to save myself some headaches), does anyone know the proper axis to move it along (will be attached to the right side of the screen, and should move to the right, off-screen).

Any help would be appreciated.
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
06-15-2006 12:02
iirc....

x is left right
y is up down
z allows you to hide some buttons behind others


if you check out Ziggy's truly excellent ZHAO hud in world, it uses this technique to expand and collapse wonderfully.


Another suggetsion for you. If you are building a hud for a product, please try to make the hud scalable, such that it still works for flipping in and out if the end user resizes it. Sove of us play at very high or very low resolutions, so the default hud sizes just dont work so well on some commercial huds.
Xixao Dannunzio
Owner, X3D Enterprises
Join date: 20 Mar 2006
Posts: 114
06-15-2006 12:06
Much appreciated.

As for the scaling, I plan to build it on a very tiny scale, then scale up the finished HUD to fit. This should allow others to do the same. However, I'm not sure how this will affect the collapse feature. Any thoughts?
Herzog Svarog
The Wise(ass)
Join date: 9 Nov 2004
Posts: 74
06-15-2006 13:04
A better option might be to have the HUD move up or down, that way if the end user decides they'd rather have the HUD on the left side of their screen, they'll be able to do so with no problem. (remember, not all of us have our screens set up the same way...my map is on the upper left corner of my screen, not the right/default side) Just something to consider. :)
_____________________
Try to remember, there is no spoon... :eek:
Hal9k Andalso
Registered User
Join date: 30 Mar 2006
Posts: 60
"Minimizing" a HUD
06-15-2006 13:11
I wrote the Second411 HUD to "minimize" a certain amount when results were clicked on, but this was basically just a shot in the dark. You can see a good screenshot and writeup of the service on the VTOR Blog:

http://www.blogcharm.com/vtor/33401/Second411+search+for+items+inside+SL.html

I'm curious as to how the scaling is done as I didn't think it was possible to find out what dimension someone's screen was via LSL. Is this just set manually?
Bitzer Balderdash
Dazed and Confused
Join date: 21 Dec 2005
Posts: 246
06-16-2006 04:02
If you want to be able to move prims about in sensible ways, even though they may have been rescaled the best way to do it would be to define all the movement deltas in terms of multiples of the prim's size.

So, when you minimise, or restore, you just check the current size, and move by the appropriate amount.

Another good way to do it is to rotate the whole object on minimise, so you see a thin top prim, but that does rather restrict you to having your root prim at the top of the set, for a top mounted hud, or at the bottom of the set for a bottom mounted hud - unless you remember the position so that a user can specify their own independant xy for restored and for minimised.
Keiki Lemieux
I make HUDDLES
Join date: 8 Jul 2005
Posts: 1,490
06-16-2006 08:46
BTW, I believe you will want to use llGetLocalPos() from the root prim to get the position of the HUD on the screen. llGetPos() will give you the position of the avatar in region coordinates when used on a HUD.
_____________________
imakehuddles.com/wordpress/