|
Arrekusu Muromachi
SL Fighter Ace
Join date: 20 Feb 2005
Posts: 32
|
03-23-2006 23:34
It's got to the point where I wanna work on menus and submenus for my aircraft. I understand how to setup a simple menu using the llDialog but what puzzles me is how to break into a sub menu and then return from it using a back button. Moreso a sub-sub menu that gives me additional features such as issuing a command to change color, turn a certain thing on or of, or provide basic help. How would I go about writing code to drop into a sub and sub-sub menus, then have the option of going back from the sub-sub or back to the main itself? To verify what I'm talking about. - Main Menu
Color
Combat System
Autostart
Start/Stop
Camera
Eject
Basically that type of menu system except using buttons.
|
|
Jabador Jimador
happy submissive
Join date: 28 Sep 2005
Posts: 15
|
03-24-2006 01:26
There's probably a smarter way out there, but what i do is putting the menu in a function or seperate script, then calling it using a state variables something like: integer igHandler; //Listen handler
menu (integer ilState) { if (ilState == 0) { llDialog (llGetOwner (), "Main menu", ["Options"], 1); } else if (ilState == 1) { llDialog (llGetOwner (), "Options", ["Main"], 1); } if (igHandler) llListenRemove (igHandler); llListen (1, "", llGetOwner (), ""); }
default { touch_end (ilDetected) { if (llGetDetectedKey (0) == llGetOwner ()) { menu (0); } }
listen (integer ilChan, string slName, key klId, string slData) { if (slData == "Options") { menu (1); else if (slData == "Main") { menu (0); llListenRemove (igHandler); } }
NOTE: This has not been tested in any way - Use with caution
_____________________
Jabador Jimador Owned and collared by Master Spiritfire Musketeer Any questions or complaints are to be directed to Him
|
|
FireEyes Fauna
Registered User
Join date: 26 Apr 2004
Posts: 138
|
03-24-2006 12:06
|