llSetTextAligned( string text, vector color, float alpha, integer alignment );
tracked
Peter Stindberg
A function to use left or right aligned hovertext.
alignment < 0 results in left alignment
alignment > 0 results in right alignment
alignment = 0 results in centered alignment, equal to llSetText's behavior
This could go along with three new constants:
ALIGN_LEFT = -1
ALIGN_RIGHT = +1
ALIGN_CENTER = 0
Log In
Andromeda Quonset
I like WolfGang Senizen suggestion, but I think that it should allow for setting text to Boldface, and event the Font family as exists on the system that the viewer is installed on, and substitute a Linden font in cases where the specified font doesn't exist. My own preferred font is Liberation Sans with Boldface set all the time.
Bleuhazenfurfle Resident
START/END would probably be better…
But I'd love to see unicode alignment characters…
At a minimum; allowing per-line alignment. Easy peasy to implement, alignment character goes at start of line, or even just the such character encountered on the line.
Median option; splitting alignment within a line of text. (Obviously, only start to end ordering is respected.) Good for drawing "box edges", as quite a few scripts try to do (mostly badly).
Awesome option; table algorithm — a special unicode character indicates number of columns the next piece of text will occupy (can limit it to 8 or something), and then you can specify alignment within that cell (default on each new line is to centre, spanning all columns). Bonus points for spreadsheed-style decimal alignment.
Peter Stindberg
Bleuhazenfurfle Resident All nice, all great. But I rather ask for something simple to implement and eventually get it, than ask for the big package and never get it.
Bleuhazenfurfle Resident
Peter Stindberg: That's why I prefaced it with, "but I'd love to see"…
Generally, I am inclined to agree. Still… I kinda think left/right-justified float text would look kinda weird in most cases, and be of limited use. But even the minimal per-line alignment would open soooo many doors!!!
But, if all we get is your suggestion… Then I still have a counter-idea… Change it from discrete values of -1,0,1 to a float between 0.0 and 1.0 — this is done in several GUI's I've used, to great effect (could go -1 through 1, but the math gets ickier). Alternatively, discrete values can be added to later, though in that case 1 and 2 for left and right would be better, too, leaving room for flags or something.
Also, this can be added onto what we have now without even requiring a new command — if LL can pick a couple unicode characters they're reasonably sure people aren't going to be using. Though for ultimate backward compatibility, a new command would be a good idea.
Also also, I had written that thinking about how the idea can be done progressively… Once the minimum option is added, the median one can be added later with zero user-facing changes (as long as people were told to put the characters at the front of lines). The awesome one can then still use those same characters (and command), by just adding in a few more (also optional) for the advanced layout features. (I called it the "awesome" option, because it would be, but it's probably waaaay overkill.)
Lucia Nightfire
What is the align left/right aligning to? The left/right of the longest line?
Peter Stindberg
Lucia Nightfire That would be the logical choice.
WolfGang Senizen
I would much prefer a
llSetTextStyled
with a paramter list of stylesSomething like this
llSetTextStyled(
"Text\nMore",
[
TEXT_STYLE_COLOR, <1.0, 1.0, 1.0>,
TEXT_STYLE_ALPHA, 1.0,
TEXT_STYLE_ALIGNMENT, AIGNMENT_LEFT,
TEXT_FONT_FAMILY, "mono"
]
);
Would allow for further expansion later.
Also ... https://feedback.secondlife.com/scripting-features/p/add-a-text-rendering-method please LL 🙏?
Peter Stindberg
WolfGang Senizen A text-rendering method on faces/surfaces would make a lot of hovertext unnecessary. I won't hold my breath though. Your suggestion would work as well - whatever is easiest for the Lab.
Bleuhazenfurfle Resident
WolfGang Senizen: The option that whoops
ALL
this… Static SVG particle. Done. Finished. No need for anything else.Spidey Linden
tracked
Issue tracked. We have no estimate when it may be implemented. Please see future updates here.