Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HUDs, AlphaTextures and Mouse clicks

Burgundy Rahja
Registered User
Join date: 2 Oct 2006
Posts: 31
01-04-2007 08:03
HI,

I am working on HUD. When attached it can be "full size" or "minimized". When minimized,
I set many of the linked prims invisible.

My problem is with mouse clicks. I have noticed that when the HUD in in the minimized state that clicking on an in-world object that is covered by the HUD invisibile prim (ie in the same camera screen area) .. that the invisible prim will get the mouse click and not the in-world object.

Is there anything I can do other an make my "full size" hud as small as possible?
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
01-04-2007 08:05
I use a rotate and actually rotate the hud off the screen. and leave the min un min part on screen..
You could also try states in each touchable prim.. and make sure the state thats min does not have a touch event.
_____________________
LSL Scripting Database - http://lsl.dimentox.com
Burgundy Rahja
Registered User
Join date: 2 Oct 2006
Posts: 31
01-04-2007 08:17
Dimentox,

Cool answer. Yes I could rotate the elements of the screen. Or just move them I guess.

I would like to probe on your second answer a little more however...

Are you saying that it if I turn off on_touch registration for the invisible SIMs (ie have a state which just doesnt have that call back entry point) that the clicks will pass through it? Have you done this before?
Jacques Groshomme
Registered User
Join date: 16 Mar 2005
Posts: 355
01-04-2007 10:19
A transparent HUD prim will still block world interaction with the screen real estate "underneath" it. The only way to accomplish what you want is to move out of the way.
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
01-04-2007 10:55
What about Alphaed and Phantom?
_____________________
LSL Scripting Database - http://lsl.dimentox.com
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
01-04-2007 12:00
http://secondlife.com/support/known-issues.php

SL-11750: Inworld objects can't be selected when behind HUD object set transparent via llSetAlpha(0,ALL_SIDES)

Current workaround is as suggested, to move/rotate the prims off screen.
Dimentox Travanti
DCS Coder
Join date: 10 Sep 2006
Posts: 228
01-04-2007 12:25
Good find... Ive never had this issue cause i mobve my huds off screen
_____________________
LSL Scripting Database - http://lsl.dimentox.com
Burgundy Rahja
Registered User
Join date: 2 Oct 2006
Posts: 31
01-04-2007 12:44
Well I got it to work ... and it looks fine. And was a wonderful opportunity to learn
about rotation of linked sets :)

In my HUD it is the root prim which stays when minimized and the rest vanishes.

I found that llGetRot() * a rotation vector didnt work as expected. I am not sure if
this was because I am calling this from in a HUD. In the end I just used llSetRot into
which I passed an absolute vector (using the rotation orientation I read off the
object editor).

Is there any programatic way I can find out what the "initial position" is, rather than hard code in these two vectors?

Also related to this I posted another thread on the initial rotation of linked groups into the forum. I built my initial object but it attached initially at a strange rotation. Do my default or starting rotation in not <0,0,0>.

How do you initially construct a HUD such that it doesnt need the initial rotation. I mean do I have to face west or something? (Or perhaps say a sort of prayer? :)

Thanks for your help guys.
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
01-24-2007 10:16
The Wikki says "Invisible objects created using llSetAlpha can still be selected with the right mouse button, while an object with a 100% alpha texture can not be unless the user has transparent objects highlighted."

I'm curious if this is true, but haven't had an opportunity to try it. Anyone know offhand? If so, then a HUD wouldn't have to be rotated, it could just have the texture changed to a 100% alpha texture using llSetTexture to render it invisible, and transparent to mouseclicks.
Atashi Toshihiko
Frequently Befuddled
Join date: 7 Dec 2006
Posts: 1,423
01-24-2007 10:42
From: Darien Caldwell
The Wikki says "Invisible objects created using llSetAlpha can still be selected with the right mouse button, while an object with a 100% alpha texture can not be unless the user has transparent objects highlighted."

I'm curious if this is true, but haven't had an opportunity to try it. Anyone know offhand? If so, then a HUD wouldn't have to be rotated, it could just have the texture changed to a 100% alpha texture using llSetTexture to render it invisible, and transparent to mouseclicks.


Not true. I have a 100% invisible object on my land and I can right-click select it without having transparent objects highlighted. It's hit-and-miss if I don't remember *exactly* where it is, but if I know where it is, my clicks / right-clicks are on the 100% invisible object, and not the objects behind it.

-Atashi
Darien Caldwell
Registered User
Join date: 12 Oct 2006
Posts: 3,127
01-24-2007 17:08
I tested it in world, and it is true, you can't *right* click it with an alpha texture. However the prim still blocked Left clicks while on screen. So rotating off screen it is... :(