Skip to content

Menu System

HowardBaxton edited this page Apr 11, 2020 · 12 revisions

The menu is made from notecard names that begin with the key word SET. Begin ALL notecard name with SET, followed by a colon as separator, and menu button name at the end. All notecards within the build beginning with this key word will be used to create menu buttons.

SET:
New in V3.0 and above nPose now sorts out what it needs to do when it processes the notecard contents. In previous versions a notecard had a key word to determine what the contents should consist of. That is no longer the case as nPose will now handle all types of contents as it should.

For the purposes of the menu system only, nPose does not look inside the notecard and only concerns itself with the notecard name. To test this, make a notecard in your inventory and give it this name "SET:Meditate". Put this notecard into a prim with the basic set of nPose scripts and touch the prim to get it's menu. The menu should display one button with the word "Meditate" on it. Please note that clicking this button will cause a script error because nPose is expecting something inside the notecard which will be discussed here: NOT YET DEFINED.

Menu Order

New in V3.0 and above, using the Menu Order notecard can be eliminated in favor of the new feature which allows the use of comments in the notecard name. The order of the menu buttons can be controlled by these comments.

Also new in V3.0 and above there is no longer a need to use the '-' at the end of a notecard name to suppress the re-menu since all menus are now up to date when they come up on the viewer. This feature has been removed.

V3.0 does still support the use of '.Change Menu Order'. Simply add a notecard by the name of '.Change Menu Order' and add it to the contents tab of nPose. This name is coded into the scripts and cannot be anything different from the mentioned name. With this notecard added, nPose will build the menu based upon the contents of this notecard so be sure to add all the SET notecard names to the contents of this '.Change Menu Order' notecard. nPose also knows not to sort the menu before it is displayed when using this '.Change Menu Order' notecard. Add and arrange the SET notecard names in the order they will be displayed to the user.

I have experimented with setting submenu buttons and found an easy way to arrange them in any order desired. At the top of the '.Change Menu Order' notecard, add a listing of submenu buttons in the order they will be displayed, and then add sub-submenu buttons next, etc. While setting up the submenu order, it is not required to have a button name while building the menu, nPose will reserve the submenu place when simply using the submenu menu path, such as BTN:Utilities will reserve this submenu path and desired order for the Utility submenu button. Then in a group below, add all the Utility buttons (with button names) and put them in the specific order within that group desired.

nPose will not process empty lines and specifically lines beginning with the hash '#' so grouping submenu items and making notes within while you go is easy to do.

IMPORTANT: PLEASE REMEMBER THAT ANY NOTECARDS NOT LISTED IN THE '.Change Menu Order' NOTECARD WILL NOT BE SHOWN IN YOUR MENU.

Extra Notes

There are cases where it does not make sense for some sitters to see specific menu buttons. The nPose system allows us to limit who can see and use these specific buttons by using Button Permissions.