Difference between revisions of "User:Rufus Darkfold/Dialogger"
m |
|||
Line 19: | Line 19: | ||
;<1,1,0,0> | ;<1,1,0,0> | ||
:texture picker. Drop any full-perm texture on it to send its UUID as its value. [[File:texture-dropbox.jpg|75px]] | :texture picker. Drop any full-perm texture on it to send its UUID as its value. [[File:texture-dropbox.jpg|75px]] | ||
;<1,n,s | ;<1,n,0,s> | ||
: (n>1) Dropdown menu. Specified texture is divided vertically into n frames. The texture should have text and/or images divided into that many frames. Initially the frame reflecting the current value is displayed using an appropriate offset and repeat count. [[File:dropdown-menu.jpg]] When clicked, the field expands vertically n times to display the entire menu. [[File:dropdown-menu-expanded.jpg]] When the expanded menu is clicked, the clicked value is selected as the new value and the menu returns to its normal size. s=0 for a square button, 1 for a round button. | : (n>1) Dropdown menu. Specified texture is divided vertically into n frames. The texture should have text and/or images divided into that many frames. Initially the frame reflecting the current value is displayed using an appropriate offset and repeat count. [[File:dropdown-menu.jpg]] When clicked, the field expands vertically n times to display the entire menu. [[File:dropdown-menu-expanded.jpg]] When the expanded menu is clicked, the clicked value is selected as the new value and the menu returns to its normal size. s=0 for a square button, 1 for a round button. | ||
;<2,0,0,0> | ;<2,0,0,0> |
Latest revision as of 17:26, 22 December 2012
Dialogger is a HUD which uses a pool of prims to display buttons and sliders and other types of controls. This affords much greater control over the location and the appearance of these controls than llDialog, as well as providing a convenient way of setting numerical values.
To put a dialog prim on the screen, send a chat to channel 444 or a link message to 44400:
[/outchan] name,p,px[,v]
/outchan = (optional) / character followed by return chat channel number followed by space. (The [ ] are not part of the message)
name = field label or texture
p = location to place control (rotation: <lowerleft.x,lowerleft.y,upperright.x,upperright.y>). 0,0 is the lower-left corner of the root prim, 1,1 is the upper right, so <0,0,1,1> would cover the whole thing if it is rectangular. <0,0,0,0> will continue to use the old location if the named control is already being displayed. <0,0,0,1>, "ZERO_VECTOR" will delete the named control if it exists.
px (rotation) = bounds or control type:
- <1,0,0,0>
- texture (texture name in newtext)
- <1,1,0,0>
- texture picker. Drop any full-perm texture on it to send its UUID as its value.
- <1,n,0,s>
- (n>1) Dropdown menu. Specified texture is divided vertically into n frames. The texture should have text and/or images divided into that many frames. Initially the frame reflecting the current value is displayed using an appropriate offset and repeat count. When clicked, the field expands vertically n times to display the entire menu. When the expanded menu is clicked, the clicked value is selected as the new value and the menu returns to its normal size. s=0 for a square button, 1 for a round button.
- <2,0,0,0>
- on/off button green/red
- <2,r,g,b>
- (0<=(r,g,b)<=1) button in color rgb
- <3,lo,0,hi>
- 3 vertical sliders with a range from lo to hi
- <3,lo,2,hi>
- 1 2-dimensional xy-slider and 1 vertical z slider with a range from lo to hi
- otherwise <lowerlimit.x,lowerlimit.y,upperlimit.x,upperlimit.y>
- slider control in 1 or 2 dimensions
v = value (vector) to display (optional). Scalar values are passed as <x,0,0>
If name specifies a dialog prim that is already being displayed, that one is updated. In that case, p and px are also optional (use old values if blank or missing).
An empty message clears all dialog prims.
When a dialogger control is clicked, a link message is generated on channel 44401. If "outchan" was specified above, it will also be sent on that chat channel.
The message format is:
Controlname:value
"Controlname" is the text tag of the control. "value" is generally a vector. Scalar quantities are returned as <x,0,0>. The texture picker is an exception in that it returns the key to the dropped texture as its value.
An easy way to experiment with dialogger is to bring up the dialogger window in the charttracker/dialogger/primcontrol HUD. Then send the following chat message on channel 444:
/0 test,<.1,.1,.4,.4>,<3,0,2,1>
This should create an xyz slider (which actually has 2 sliders, as described above) in the lower left of the HUD. Additional controls can be created by sending additional messages. Requests can be concatenated and sent in a single message, separated by newline characters.
An empty message on channel 444 clears all controls.
sending an empty message on channel 444 will clear it.