Component:ContextMenuItemSource: Difference between revisions

From Resonite Wiki
Zandario (talk | contribs)
m Removed old Vids & Issues
 
add more info
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ContextMenuItemSourceComponent.png
|Image=ContextMenuItemSourceComponent.png
|Name=Context Menu Item Source
|Name=Context Menu Item Source
}}
}}
{{stub}}


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)|Context Menu Submenu]] or assigned to a [[RootContextMenuItem (Component)|Root Context Menu Item]] as its Item.
The ContextMenuItemSource component is used to add additional items to a [[Context menu|context menu]].  


<!--T:2-->
<!--T:2-->
Line 12: Line 12:
{{Table ComponentFields
{{Table ComponentFields
|Label|String| The text label next to the item.
|Label|String| The text label next to the item.
|Color|Color| The background/border color of the item.
|Color|ColorX| The background/border color of the item.
|Sprite|IAssetProvider`1|TypeString2=IAssetProvider<Sprite>| The icon that is displayed on the item.
|Sprite|'''[[Type:IAssetProvider`1|IAssetProvider`1]]&lt;[[Type:Sprite|Sprite]]&gt;'''|TypeAdv2=true| 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.
|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.
|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.
|CloseMenuOnPress|Bool| Whether or not the context menu should be closed after the item is pressed.
|Pressed|WorldDelegate| {{stub}}
|Pressed|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv6=true| See [[ProtoFlux:Button_Events|ButtonEvents]]
|Pressing|WorldDelegate| {{stub}}
|Pressing|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv7=true| See [[ProtoFlux:Button_Events|ButtonEvents]]
|Released|WorldDelegate| {{stub}}
|Released|{{RootFieldType|SyncDelegate`1|[[Type:ButtonEventHandler|ButtonEventHandler]]}}|TypeAdv8=true| See [[ProtoFlux:Button_Events|ButtonEvents]]
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
{{stub}}
Attach to a slot, and provide a name and color. The name and color can also be dynamically driven using a [[Component:ValueOptionDescriptionDriver|Value Option Description Driver]] to display what the button does/did.
 
To show up, it needs to be either within a [[ContextMenuSubmenu (Component)|Context Menu Submenu]] or assigned to a [[RootContextMenuItem (Component)|Root Context Menu Item]] as its Item.


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
{{stub}}
This is extremely popular in almost every avatar in Resonite. It is used in context menus to allow the customization of avatar settings like clothes, systems, code, and colors on the run without having to use an inspector. This component is also used in


<!--T:5-->
<!--T:5-->
Line 34: Line 36:
{{stub}}
{{stub}}


[[Category:ComponentStubs]]
[[Category:Components:Radiant UI:Context Menu{{#translation:}}|Context Menu Item Source]]
[[Category:Components|Context Menu Item Source]]
[[Category:Components{{#translation:}}|Context Menu Item Source]]
[[Category:Components:Radiant UI:Context Menu|Context Menu Item Source]]

Latest revision as of 17:31, 16 October 2024

Component image 
Context Menu Item Source component as seen in the Scene Inspector


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


The ContextMenuItemSource component is used to add additional items to a context menu.

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 ColorX The background/border color of the item.
Sprite IAssetProvider`1<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 ButtonEventHandler See ButtonEvents
Pressing ButtonEventHandler See ButtonEvents
Released ButtonEventHandler See ButtonEvents

Usage

Attach to a slot, and provide a name and color. The name and color can also be dynamically driven using a Value Option Description Driver to display what the button does/did.

To show up, it needs to be either within a Context Menu Submenu or assigned to a Root Context Menu Item as its Item.

Examples

This is extremely popular in almost every avatar in Resonite. It is used in context menus to allow the customization of avatar settings like clothes, systems, code, and colors on the run without having to use an inspector. This component is also used in

Related Issues

This article or section is a Stub. You can help the Resonite Wiki by expanding it.