{"_id":"594949e92be16d0026ec0551","category":{"_id":"594949e62be16d0026ec04cf","version":"594949e52be16d0026ec04cd","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":"594949e52be16d0026ec04cd","project":"571fa55ca0acd42000af9545","__v":2,"createdAt":"2017-06-20T16:14:29.816Z","releaseDate":"2017-06-20T16:14:29.816Z","categories":["594949e62be16d0026ec04ce","594949e62be16d0026ec04cf","594949e62be16d0026ec04d0","594949e62be16d0026ec04d1","594949e62be16d0026ec04d2","594949e62be16d0026ec04d3","594949e62be16d0026ec04d4","594949e62be16d0026ec04d5","594949e62be16d0026ec04d6","594949e62be16d0026ec04d7","594949e62be16d0026ec04d8","594949e62be16d0026ec04d9","594949e62be16d0026ec04da","594949e62be16d0026ec04db","594949e62be16d0026ec04dc","594949e62be16d0026ec04dd","594949e62be16d0026ec04de","594949e62be16d0026ec04df","594949e62be16d0026ec04e0","594949e62be16d0026ec04e1","59497219f4a8980024dd0631"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Kunekune","version_clean":"3.2.0","version":"3.2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-16T08:08:29.331Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":14,"body":"## Overview\n\nPurpose: panel item controller class that intercepts the controller events sent from a [PanelMenuController] and passes them onto additional custom event subscriber scripts, which then carry out the required custom UI actions.\n\nThis script should be attached to a VRTK_InteractableObject > [PanelMenuController] > [panel items container] > child GameObject (See the [PanelMenuController] class for more details on setup structure.).\nTo show / hide a UI panel, you must first pick up the VRTK_InteractableObject and then 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 Purpose: panel item controller class that intercepts the controller events sent from a [PanelMenuController] and passes them onto additional custom event subscriber scripts, which then carry out the required custom UI actions. This script should be attached to a VRTK_InteractableObject > [PanelMenuController] > [panel items container] > child GameObject (See the [PanelMenuController] class for more details on setup structure.). To show / hide a UI panel, you must first pick up the VRTK_InteractableObject and then 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.