SbDialog

From Second Life Wiki
Revision as of 07:27, 25 July 2008 by Siann Beck (talk | contribs) (Created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

<lsl> 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;

} </lsl>