Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetText() and HUD Attachments

Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
11-09-2005 17:24
#1, I would just like to say THANK YOU to LL for making this work. HUDs have been something we've needed for a long time, and llSetText() is a natural complement to that.

However, I think llSetText() could use a few minor improvements... (there is always a catch, yes?)
  1. Let us justify the text line right, left, or center. The reference would be the prim the llSetText() call is originating from. So, if left-justified, a string of text would start out at the left edge of the prim. I don't know whether it would overflow or wrap or something if it got wide enough to run past the edge, but that's a minor detail. I would write my code to make sure that didn't happen.
  2. Let us choose whether to use a proportional or fixed-with font. (Hint: Fixed-width would be hugely preferable on HUDs that display any kind of formatted data.)
  3. Let us choose at least to have small or large text. As it is, running in 1280x1024, the text is hard to read. It becomes sharper if I make the window smaller. Ideally I'd like to be able to display the text in 8-16 point font size.
  4. Embeddable color codes would be nice, but not essential. Something to think about if you're going to touch the codebase.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
11-10-2005 12:55
From: Huns Valen
#1, I would just like to say THANK YOU to LL for making this work. HUDs have been something we've needed for a long time, and llSetText() is a natural complement to that.

However, I think llSetText() could use a few minor improvements... (there is always a catch, yes?)
  1. Let us justify the text line right, left, or center. The reference would be the prim the llSetText() call is originating from. So, if left-justified, a string of text would start out at the left edge of the prim. I don't know whether it would overflow or wrap or something if it got wide enough to run past the edge, but that's a minor detail. I would write my code to make sure that didn't happen.
  2. Let us choose whether to use a proportional or fixed-with font. (Hint: Fixed-width would be hugely preferable on HUDs that display any kind of formatted data.)
  3. Let us choose at least to have small or large text. As it is, running in 1280x1024, the text is hard to read. It becomes sharper if I make the window smaller. Ideally I'd like to be able to display the text in 8-16 point font size.
  4. Embeddable color codes would be nice, but not essential. Something to think about if you're going to touch the codebase.
  1. not really feasable based on prim position nor really logical for multiline Floating Text, unless it is it's own attribute like color or alpha.
  2. totaly reasonable.
  3. font scaling, should be an option. (and the script should be able to get these values)
  4. Would overly complicate the code and require an entirely new class of escape codes.


Functions:
vector llGetOwnerScreenSize()
llSetTextAdv(string text, vector colour, float alpha, string font, vector size)
size.z is ignored
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
SuezanneC Baskerville
Forums Rock!
Join date: 22 Dec 2003
Posts: 14,229
11-10-2005 13:13
is there some reason the text has to be offset from the prim instead of being centererd in the prim?
_____________________
-

So long to these forums, the vBulletin forums that used to be at forums.secondlife.com. I will miss them.

I can be found on the web by searching for "SuezanneC Baskerville", or go to

http://www.google.com/profiles/suezanne

-

http://lindenlab.tribe.net/ created on 11/19/03.

Members: Ben, Catherine, Colin, Cory, Dan, Doug, Jim, Philip, Phoenix, Richard,
Robin, and Ryan

-
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
11-10-2005 13:16
I agree.

More flexible fonts are a natural progression to making this feature more useful.
_____________________
Logan Bauer
Inept Adept
Join date: 13 Jun 2004
Posts: 2,237
11-10-2005 13:41
From: SuezanneC Baskerville
is there some reason the text has to be offset from the prim instead of being centererd in the prim?



I think, if you have a counter for example, since it automatically centers the text it's a bit cumbersome. For example:

Value : 0
Value : 100
Value : 10000

Assuming in the above example that the number is the XYtext and the "Value:" words are baked into a texture, a part of your hud. If we had the ability to make the text only expand to the right(and in effect left-justify while still starting at the center of the object) instead of auto-centering, the above problem could be solved without having to try to come up with a complex workaround.
Zodiakos Absolute
With a a dash of lemon.
Join date: 6 Jun 2005
Posts: 282
11-10-2005 18:18
I understand exactly what you mean, and I was thinking something like this would be nice too. Having centered text isn't so bad, but what if you want to line certain text up, or if you want to create a terminal of text using llSetText? Center justification wouldn't work right for that. You would be forced to use XYtext (like I have. :( )
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
11-10-2005 21:03
From: Strife Onizuka
  1. not really feasable based on prim position nor really logical for multiline Floating Text, unless it is it's own attribute like color or alpha.

I don't see why not. The client knows the bounds of the prim on the client's screen.