{"_id":"5b1f8576c2505d00031254a7","category":{"_id":"5b1f8576c2505d0003125425","version":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-07-31T16:56:01.612Z","from_sync":false,"order":1,"slug":"prefabs","title":"Prefabs"},"user":"571fa519db52d01700f5cf3d","parentDoc":null,"project":"571fa55ca0acd42000af9545","version":{"_id":"5b1f8576c2505d00031254db","project":"571fa55ca0acd42000af9545","__v":4,"forked_from":"594949e52be16d0026ec04cd","createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["5b1f8576c2505d0003125424","5b1f8576c2505d0003125425","5b1f8576c2505d0003125426","5b1f8576c2505d0003125427","5b1f8576c2505d0003125428","5b1f8576c2505d0003125429","5b1f8576c2505d000312542a","5b1f8576c2505d000312542b","5b1f8576c2505d000312542c","5b1f8576c2505d000312542d","5b1f8576c2505d000312542e","5b1f8576c2505d000312542f","5b1f8576c2505d0003125430","5b1f8576c2505d0003125431","5b1f8576c2505d0003125432","5b1f8576c2505d0003125433","5b1f8576c2505d0003125434","5b1f8576c2505d0003125435","5b1f8576c2505d0003125436","5b1f8576c2505d0003125437","5b1f8576c2505d0003125438","5b1f8aab9c683000032979e7","5b1f8b2f3073470003ffa5da","5b1f8bd9fd653400031d94f4","5b1f900bd4c5f000036b57bd"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Mangalica","version_clean":"3.3.0","version":"3.3.0"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-16T08:08:29.331Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":14,"body":"## Overview\n\nIntercepts the controller events sent from a `VRTK_PanelMenuController` and passes them onto additional custom event subscriber scripts, which then carry out the required custom UI actions.\n\n  > This script is not directly part of a prefab but is a helper associated to the `PanelMenu` prefab.\n\n* Place the `VRTK/Prefabs/PanelMenu/VRTK_PanelMenuItemController` script on the child GameObject of any Panel Item Container which is contained within the `PanelMenuController` prefab within the scene.\n* Pick up the VRTK_InteractableObject show/hide the panel menu by pressing the touchpad top/bottom/left/right you can open/close the child UI panel that has been assigned via the Unity Editor panel.\n\n## Class Events\n\n * `PanelMenuItemShowing` - Emitted when the panel menu item is showing.\n * `PanelMenuItemHiding` - Emitted when the panel menu item is hiding.\n * `PanelMenuItemSwipeLeft` - Emitted when the panel menu item is open and the user swipes left on the controller touchpad.\n * `PanelMenuItemSwipeRight` - Emitted when the panel menu item is open and the user swipes right on the controller touchpad.\n * `PanelMenuItemSwipeTop` - Emitted when the panel menu item is open and the user swipes top on the controller touchpad.\n * `PanelMenuItemSwipeBottom` - Emitted when the panel menu item is open and the user swipes bottom on the controller touchpad.\n * `PanelMenuItemTriggerPressed` - Emitted when the panel menu item is open and the user presses the trigger of the controller holding the interactable object.\n\n## Event Payload\n\n * `GameObject interactableObject` - The GameObject for the interactable object the PanelMenu is attached to.\n\n## Class Methods\n\n### SetPanelMenuItemEvent/1\n\n  > `public virtual PanelMenuItemControllerEventArgs SetPanelMenuItemEvent(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * `PanelMenuItemControllerEventArgs` - The payload for the event.\n\nThe SetPanelMenuItemEvent is used to build up the event payload.\n\n### Show/1\n\n  > `public virtual void Show(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe Show method is used to show the menu.\n\n### Hide/1\n\n  > `public virtual void Hide(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe Hide method is used to show the menu.\n\n### SwipeLeft/1\n\n  > `public virtual void SwipeLeft(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe SwipeLeft method is used when the control is swiped left.\n\n### SwipeRight/1\n\n  > `public virtual void SwipeRight(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe SwipeRight method is used when the control is swiped right.\n\n### SwipeTop/1\n\n  > `public virtual void SwipeTop(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe SwipeTop method is used when the control is swiped up.\n\n### SwipeBottom/1\n\n  > `public virtual void SwipeBottom(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe SwipeBottom method is used when the control is swiped down.\n\n### TriggerPressed/1\n\n  > `public virtual void TriggerPressed(GameObject interactableObject)`\n\n * Parameters\n   * `GameObject interactableObject` - The object the menu is attached to.\n * Returns\n   * _none_\n\nThe TriggerPressed method is used when the control action button is pressed.\n\n## Example\n\n`040_Controls_Panel_Menu` contains three basic interactive object examples of the PanelMenu in use.","excerpt":"","slug":"panel-menu-item-controller","type":"basic","title":"Panel Menu Item Controller"}

Panel Menu Item Controller


## Overview Intercepts the controller events sent from a `VRTK_PanelMenuController` and passes them onto additional custom event subscriber scripts, which then carry out the required custom UI actions. > This script is not directly part of a prefab but is a helper associated to the `PanelMenu` prefab. * Place the `VRTK/Prefabs/PanelMenu/VRTK_PanelMenuItemController` script on the child GameObject of any Panel Item Container which is contained within the `PanelMenuController` prefab within the scene. * Pick up the VRTK_InteractableObject show/hide the panel menu by pressing the touchpad top/bottom/left/right you can open/close the child UI panel that has been assigned via the Unity Editor panel. ## Class Events * `PanelMenuItemShowing` - Emitted when the panel menu item is showing. * `PanelMenuItemHiding` - Emitted when the panel menu item is hiding. * `PanelMenuItemSwipeLeft` - Emitted when the panel menu item is open and the user swipes left on the controller touchpad. * `PanelMenuItemSwipeRight` - Emitted when the panel menu item is open and the user swipes right on the controller touchpad. * `PanelMenuItemSwipeTop` - Emitted when the panel menu item is open and the user swipes top on the controller touchpad. * `PanelMenuItemSwipeBottom` - Emitted when the panel menu item is open and the user swipes bottom on the controller touchpad. * `PanelMenuItemTriggerPressed` - Emitted when the panel menu item is open and the user presses the trigger of the controller holding the interactable object. ## Event Payload * `GameObject interactableObject` - The GameObject for the interactable object the PanelMenu is attached to. ## Class Methods ### SetPanelMenuItemEvent/1 > `public virtual PanelMenuItemControllerEventArgs SetPanelMenuItemEvent(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * `PanelMenuItemControllerEventArgs` - The payload for the event. The SetPanelMenuItemEvent is used to build up the event payload. ### Show/1 > `public virtual void Show(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The Show method is used to show the menu. ### Hide/1 > `public virtual void Hide(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The Hide method is used to show the menu. ### SwipeLeft/1 > `public virtual void SwipeLeft(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The SwipeLeft method is used when the control is swiped left. ### SwipeRight/1 > `public virtual void SwipeRight(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The SwipeRight method is used when the control is swiped right. ### SwipeTop/1 > `public virtual void SwipeTop(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The SwipeTop method is used when the control is swiped up. ### SwipeBottom/1 > `public virtual void SwipeBottom(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The SwipeBottom method is used when the control is swiped down. ### TriggerPressed/1 > `public virtual void TriggerPressed(GameObject interactableObject)` * Parameters * `GameObject interactableObject` - The object the menu is attached to. * Returns * _none_ The TriggerPressed method is used when the control action button is pressed. ## Example `040_Controls_Panel_Menu` contains three basic interactive object examples of the PanelMenu in use.