Difference between revisions of "ContextMenuItemSource (Component)"
m |
(Wrote article.) |
||
Line 7: | Line 7: | ||
|Name=Context Menu Item Source | |Name=Context Menu Item Source | ||
}} | }} | ||
+ | |||
+ | The ContextMenuItemSource component is used to add additional items to a context menu. To show up, it needs to be either within a [[ContextMenuSubmenu (Component)|ContextMenuSubmenu]] or assigned to a [[RootContextMenuItem (Component)|RootContextMenuItem]] as its Item. | ||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
− | |Label|String| | + | |Label|String| The text label next to the item. |
− | |Color|Color| | + | |Color|Color| The background/border color of the item. |
− | |Sprite|IAssetProvider`1|TypeString2=IAssetProvider<Sprite>| | + | |Sprite|IAssetProvider`1|TypeString2=IAssetProvider<Sprite>| The icon that is displayed on the item. |
− | |ButtonEnabled|Bool| | + | |ButtonEnabled|Bool| Whether or not the button is active. If false, it will be greyed out and unclickable. |
− | |AllowDrag|Bool| | + | |AllowDrag|Bool| Whether or not the user can drag onto the button from the center of the context menu to click it. |
− | |CloseMenuOnPress|Bool| | + | |CloseMenuOnPress|Bool| Whether or not the context menu should be closed after the item is pressed. |
|Pressed|WorldDelegate| | |Pressed|WorldDelegate| | ||
|Pressing|WorldDelegate| | |Pressing|WorldDelegate| | ||
Line 32: | Line 34: | ||
<!--T:5--> | <!--T:5--> | ||
+ | == Related Issues == | ||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/1576 <s>#1576 - Automatic context menu injection</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2346 <s>#2346 - Can't plug ContextMenuItemSource into Button Events node.</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2364 <s>#2364 - ValueOptionDescriptionDriver cant't drive ContextMenuItemSource's Sprite</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2365 #2365 - Components that take a ContextMenuItemSource as input should request a "Source", not an "Item"] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2378 <s>#2378 - Context Menu Item Source with a Null label completely breaks Context Menu</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2399 <s>#2399 - Add "Fire while pressing" toggle to ContextMenuItemSource component</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2408 <s>#2408 - Context Menu Items do not properly update visual when changing the Sprite Provider</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2449 #2449 - Automatically drive Label/Color/Sprite when attaching Reference/ValueOptionDescriptionDriver] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2516 #2516 - Add Sprite Tint to ContextMenuItemSource] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2564 #2564 - ContextMenuItemSource with ValueUserOverride<color> keeps the host user's color] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2569 #2569 - Add a TouchPoint field to ContextMenuItemSource for Dragging and/or other press actions] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/2979 <s>#2979 - ContextMenuItemSource ButtonEnabled state not respected by Flick selection</s>] | ||
+ | |||
+ | <!--T:6--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> |
Latest revision as of 18:08, 21 December 2021
This article or section is a Stub. You can help the Neos Wiki by expanding it.
The ContextMenuItemSource component is used to add additional items to a context menu. To show up, it needs to be either within a ContextMenuSubmenu or assigned to a RootContextMenuItem as its Item.
Fields
Fields | ||
---|---|---|
Name | Type | Description |
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated |
Enabled
|
Bool | Controls whether or not this component is enabled |
Label
|
String | The text label next to the item. |
Color
|
Color | The background/border color of the item. |
Sprite
|
IAssetProvider<Sprite> | The icon that is displayed on the item. |
ButtonEnabled
|
Bool | Whether or not the button is active. If false, it will be greyed out and unclickable. |
AllowDrag
|
Bool | Whether or not the user can drag onto the button from the center of the context menu to click it. |
CloseMenuOnPress
|
Bool | Whether or not the context menu should be closed after the item is pressed. |
Pressed
|
WorldDelegate | |
Pressing
|
WorldDelegate | |
Released
|
WorldDelegate |
Usage
Examples
Neos VR Tutorial: Context Menus Pt.1 - Introduction & Context Menu Components by ProbablePrime
Neos VR Tutorial: Context Menus Pt.2 - Component based Actions by ProbablePrime
Related Issues
#1576 - Automatic context menu injection
#2346 - Can't plug ContextMenuItemSource into Button Events node.
#2364 - ValueOptionDescriptionDriver cant't drive ContextMenuItemSource's Sprite
#2378 - Context Menu Item Source with a Null label completely breaks Context Menu
#2399 - Add "Fire while pressing" toggle to ContextMenuItemSource component
#2408 - Context Menu Items do not properly update visual when changing the Sprite Provider
#2449 - Automatically drive Label/Color/Sprite when attaching Reference/ValueOptionDescriptionDriver
#2516 - Add Sprite Tint to ContextMenuItemSource
#2564 - ContextMenuItemSource with ValueUserOverride<color> keeps the host user's color
#2569 - Add a TouchPoint field to ContextMenuItemSource for Dragging and/or other press actions
#2979 - ContextMenuItemSource ButtonEnabled state not respected by Flick selection