Changes

Jump to navigation Jump to search
633 bytes added ,  23:17, 16 January 2021
no edit summary
[[Category: Useful Scripts]]
[[Category: Opensim Script Library]]
 
This script will allow you to create dynamic menus for your items. This means that if you have more buttons than will fit on the dialogue menus (popup menus in the world) they will dynamically spread over multiple pages.
 
This script is written in LSL (Linden Scripting Language) and compiles in both Opensim (using either X or Y engine) and Second Life.
<br>
* Copy-paste the licence and script
* Edit the two lists in the User Variables to change the fixed and dynamic button names
 
=== Script On Github ===
[https://github.com/Fire-And-Ice-Grid/LSL-And-OSSL-Script-Library LSL And OSSL Script Library On GitHub]
==== Licence ====
<syntaxhighlight lang="ini" line>
BSD 3-Clause License
Copyright (c) 2020, Sara Payne
<syntaxhighlight lang="lsl" line>
 
 
//Start User Variables
//Menu Lists, Dynamic Buttons, Reserved Buttons and a temp list used to display the menu
GenTempMenuList(inputList); //gen list and pass the menu to process from
}
string pageMessage = menuMessage + " " + (string)(currentPageNumber+1) + " of " + (string) numOfPages;
llDialog(user, pageMessage, tempMenuButtons, mainMenuChannel); //display the current page in the dialog
//llOwnerSay("Debug: Current Page Buttons: \n" + llList2CSV(tempMenuButtons));
}// close state default
</syntaxhighlight>
 
==Syntax Highlighting==
 
[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight GeShi] syntax highlighting is enabled on this wiki. <be>
 
When using the tabs described in the link, change the language part to "lsl". Eg.<br>
syntaxhighlight lang="lsl" line<br>
inside angled brackets <>

Navigation menu