Difference between revisions of "User:Icktoofay Kamachi/LSL Wishlist/llAddMenuItem"

From Second Life Wiki
Jump to navigation Jump to search
m
m (Robot: <pre> -> <lsl>)
 
Line 9: Line 9:
|return_text=Returns a handle to the menu item, which can then be removed with llRemoveMenuItem.
|return_text=Returns a handle to the menu item, which can then be removed with llRemoveMenuItem.
|p1_type=string|p1_name=name|p1_desc=The text of the menu item.
|p1_type=string|p1_name=name|p1_desc=The text of the menu item.
|examples=<pre>default {
|examples=<lsl>default {
     state_entry() {
     state_entry() {
         integer item_handle=llAddMenuItem("Hello!");
         integer item_handle=llAddMenuItem("Hello!");
Line 18: Line 18:
     }
     }
}
}
</pre>
</lsl>
|also_events={{LSL DefineRow||[[User:Icktoofay Kamachi/LSL Wishlist/menu|menu]]|Triggered when a custom pie menu item is selected.}}
|also_events={{LSL DefineRow||[[User:Icktoofay Kamachi/LSL Wishlist/menu|menu]]|Triggered when a custom pie menu item is selected.}}
|also_functions={{LSL DefineRow||[[User:Icktoofay Kamachi/LSL Wishlist/llRemoveMenuItem|llRemoveMenuItem]]|Removes an item from the pie menu of the object.}}
|also_functions={{LSL DefineRow||[[User:Icktoofay Kamachi/LSL Wishlist/llRemoveMenuItem|llRemoveMenuItem]]|Removes an item from the pie menu of the object.}}

Latest revision as of 18:59, 4 August 2009

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: integer llAddMenuItem( string name );

Adds an item to the pie menu of the object.
Returns an integer Returns a handle to the menu item, which can then be removed with llRemoveMenuItem.

• string name The text of the menu item.

Not Implemented - feature request.

Caveats

  • This function causes the script to sleep for 0.1 seconds.

Examples

<lsl>default {

   state_entry() {
       integer item_handle=llAddMenuItem("Hello!");
   }
   menu(integer handle,string name) {
       llSay(0,name);
       llRemoveMenuItem(handle);
   }

}

</lsl>

See Also

Events

•  menu Triggered when a custom pie menu item is selected.

Functions

•  llRemoveMenuItem Removes an item from the pie menu of the object.

Deep Notes

Signature

//function integer llAddMenuItem( string name );