|
|
| Line 1: |
Line 1: |
| {{LSL_Function
| | not done |
| |func=DialogPlus
| |
| |mode=user
| |
| |p1_type=key|p1_name=avatar|p1_desc
| |
| |p2_type=string|p2_name=message|p2_desc=message to be displayed
| |
| |p3_type=list|p3_name=buttons|p3_desc=button labels
| |
| |p4_type=integer|p4_name=channel
| |
| |p5_type=integer|p4_name=CurMenu|p4_desc=Parsed menu index.
| |
| |func_desc=Creates a dialog menu for storing more then 12 buttons, very useful for Inventory items, Scanners, and just huge lists.
| |
| |func_footnote=''''CurMenu'''' will take place of an integer menuindex.<br />This requires a Listen even when using DialogPlus to allow the Back and Next button to work.
| |
| See also: [[llDialog]]
| |
| |spec=<lsl>
| |
| //Created by Ugleh Ulrik
| |
| //This sort of script should cost, but for you free :)
| |
| integer menuindex;
| |
| DialogPlus(key avatar, string message, list buttons, integer channel, integer CurMenu)
| |
| {
| |
| if (llGetListLength(buttons) >12){
| |
| list lbut = buttons;
| |
| list Nbuttons = [];
| |
| if(CurMenu == -1)
| |
| {
| |
| CurMenu = 0;
| |
| menuindex = 0;
| |
| }
| |
| if((Nbuttons = (llList2List(buttons, (CurMenu * 10), ((CurMenu * 10) + 9)) + ["Back", "Next"])) == ["Back", "Next"])
| |
| DialogPlus(avatar, message, lbut, channel, menuindex = 0);
| |
| else
| |
| {
| |
| llDialog(avatar, message, Nbuttons, channel);
| |
| }
| |
| }else{
| |
| llDialog(avatar, message, buttons, channel);
| |
| }
| |
| }
| |
| </lsl>
| |
| |examples=<lsl>
| |
| //Created by Ugleh Ulrik
| |
| default
| |
| {
| |
| | |
| touch_start(integer total_number)
| |
| {
| |
| integer time = llGetUnixTime() - 180;
| |
| llSay(0, TimeAgo(time) + " ago");
| |
| }
| |
| }
| |
| | |
| | |
| //integer time is the current unix time minus 180 seconds (3 minutes)
| |
| //The outcome will be "3 minutes ago"</lsl>
| |
| |helpers
| |
| |notes
| |
| |also
| |
| |also_functions
| |
| |also_articles
| |
| |cat1=Examples
| |
| |cat2
| |
| |cat3
| |
| |cat4
| |
| }}
| |