|
|
Line 1: |
Line 1: |
| {{LSL Header|ml=*}}
| | The Inventory floating window has both dropdown menus, and context menus. |
| | <br clear="all"/> |
| | === Inventory File Menu === |
|
| |
|
| Introduction:
| | [[File:V1.23 Inventory File Menu.jpg|thumb|300px|left]] |
| Ok you want to create a dialog based menu system, you want to support more than 12 buttons
| | <br clear="all"/> |
| so im going to give you quick overview of basic menu using [[llRezAtRoot]], [[llGetInventoryName]] & [[llGetInventoryNumber]]
| | === Inventory Create Menu === |
|
| |
|
| USAGE:just drop objects into the prim and rez them from the dialog by touching the prim.
| | [[File:V1.23 Inventory Create Menu.jpg|thumb|300px|left]] |
| | <br clear="all"/> |
| | === Inventory Sort Menu === |
|
| |
|
| <lsl> | | [[File:V1.23 Inventory Sort Menu.jpg|thumb|300px|left]] |
| list MENU1 = [];
| | <br clear="all"/> |
| list MENU2 = [];
| | === Inventory Notecard Context Menu === |
| integer listener;
| |
| integer MENU_CHANNEL = 1000;
| |
|
| |
|
| | [[File:V1.23 Inventory Notecard Context Menu.jpg|thumb|300px|left]] |
| | <br clear="all"/> |
| | === Inventory Object Context Menu === |
|
| |
|
| Dialog(key id, list menu)
| | [[File:V1.23 Inventory Object Context Menu.jpg|thumb|300px|left]] |
| {
| | <br clear="all"/> |
| llListenRemove(listener);
| | === Inventory Landmark Context Menu === |
| listener = llListen(MENU_CHANNEL, "", NULL_KEY, "");
| |
| llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
| |
| }
| |
|
| |
|
| default
| | [[File:V1.23 Inventory Landmarkt Context Menu.jpg|thumb|300px|left]] |
| {
| |
| on_rez(integer num)
| |
| {
| |
| llResetScript();
| |
| }
| |
|
| |
| touch_start(integer total_number)
| |
| {
| |
| integer i = 0;
| |
| MENU1 = [];
| |
| MENU2 = [];
| |
| integer c = llGetInventoryNumber(INVENTORY_OBJECT);
| |
| if (c <= 12)
| |
| {
| |
| for (; i < c; ++i)
| |
| MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
| |
| }
| |
| else
| |
| {
| |
| for (; i < 11; ++i)
| |
| MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
| |
| if(c > 22)
| |
| c = 22;
| |
| for (; i < c; ++i)
| |
| MENU2 += llGetInventoryName(INVENTORY_OBJECT, i);
| |
| MENU1 += ">>";
| |
| MENU2 += "<<";
| |
| }
| |
| Dialog(llDetectedKey(0), MENU1);
| |
| }
| |
|
| |
| listen(integer channel, string name, key id, string message)
| |
| {
| |
| if (channel == MENU_CHANNEL)
| |
| {
| |
| llListenRemove(listener);
| |
| if (message == ">>")
| |
| {
| |
| Dialog(id, MENU2);
| |
| }
| |
| else if (message == "<<")
| |
| {
| |
| Dialog(id, MENU1);
| |
| }
| |
| else
| |
| {
| |
| // todo add offsets so box sites perfect on rezzer
| |
| llRezAtRoot(message, llGetPos(), ZERO_VECTOR, llGetRot(), 0);
| |
| }
| |
| }
| |
| }
| |
| }
| |
| </lsl>
| |
| | |
| For technical support, requests, etc., use the Search under the Groups Tab and search for .::Prototype::.
| |
| | |
| if you have any problems getting this script to work either contact me inworld [[User:Revolution_Perenti|Revolution Perenti]]
| |
| or visit out Open Source Section at skidz partz we have many different versions of this system.
| |
| [http://slurl.com/secondlife/Snow%20Crash/128/128/23 Snow Crash]
| |
| | |
| {{LSLC|Library}}{{LSLC|Examples}}
| |