Difference between revisions of "SbDialog"
Jump to navigation
Jump to search
Siann Beck (talk | contribs) (Created page) |
m (<lsl> tag to <source>) |
||
Line 3: | Line 3: | ||
This is a simple replacement function for [[llDialog]]. It re-orders the button list so that the button values, as passed to it, display left-to-right, top-to-bottom. It also opens a [[llListen|listen]] on the specified channel, and returns the handle. | This is a simple replacement function for [[llDialog]]. It re-orders the button list so that the button values, as passed to it, display left-to-right, top-to-bottom. It also opens a [[llListen|listen]] on the specified channel, and returns the handle. | ||
< | <source lang="lsl2"> | ||
integer sbDialog(key keyAgent, string strMessage, list lstButtons, integer intChannel) { | integer sbDialog(key keyAgent, string strMessage, list lstButtons, integer intChannel) { | ||
integer intHandle; | integer intHandle; | ||
Line 17: | Line 17: | ||
return intHandle; | return intHandle; | ||
} | } | ||
</ | </source> | ||
{{LSLC|Library}}{{LSLC|Examples}} | {{LSLC|Library}}{{LSLC|Examples}} |
Latest revision as of 17:52, 24 January 2015
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
This is a simple replacement function for llDialog. It re-orders the button list so that the button values, as passed to it, display left-to-right, top-to-bottom. It also opens a listen on the specified channel, and returns the handle.
integer sbDialog(key keyAgent, string strMessage, list lstButtons, integer intChannel) {
integer intHandle;
lstButtons =
llList2List(lstButtons, -3, -1) +
llList2List(lstButtons, -6, -4) +
llList2List(lstButtons, -9, -7) +
llList2List(lstButtons, -12, -10);
intHandle = llListen(intChannel, "", keyAgent, "");
llDialog(keyAgent, strMessage, lstButtons, intChannel);
return intHandle;
}