Component:ContextMenuItem: Difference between revisions

From Resonite Wiki
Created page with "A component that is used internally within context menus. If you want to create a custom context menu, you should look at ContextMenuItemSource."
 
add info
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
A component that is used internally within context menus. If you want to create a custom context menu, you should look at [[ContextMenuItemSource_(Component)|ContextMenuItemSource]].
{{Infobox Component
|Image=ContextMenuItemComponent.png
|Name=Context Menu Item
}}
A component that is used internally within [[Context menu|context menus]]. If you want to create a custom context menu, you should look at [[Component:ContextMenuItemSource|ContextMenuItemSource]].
 
== Fields ==
{{Table ComponentFields
|Highlight|Bool| Set and unset whether the item is being hovered over and should be highlighted.
|Icon|'''[[Component:Image|Image]]'''|TypeAdv1=true| The icon of this item.
|Sprite|{{RootFieldType|RelayRef`1|[[Type:IAssetProvider`1|IAssetProvider`1]]<[[Type:Sprite|Sprite]]>}}|TypeAdv2=true| The sprite of this item.
|Label|'''[[Type:IField`1|IField`1]]<[[Type:String|String]]>'''|TypeAdv3=true| The label element of this item.
|Color|ColorX| The color of this item.
|_menu|'''[[Component:ContextMenu|ContextMenu]]'''|TypeAdv5=true| This item's origin context menu.
|_highlighted|Bool| The item is being hovered over.
|_arc|{{RootFieldType|FieldDrive`1|[[Type:Float|Float]]}}|TypeAdv7=true| The arc that makes up this item.
|_outerRadius|{{RootFieldType|FieldDrive`1|[[Type:Float|Float]]}}|TypeAdv8=true| The field that specifies the outer radius of this item.
|_button|'''[[Component:Button|Button]]'''|TypeAdv9=true| The button that makes up this item.
}}
 
== See Also ==
* [[Component:ContextMenuItemSource|ContextMenuItemSource]]
 
[[Category:Components{{#translation:}}|Context Menu Item]]
[[Category:Components:Radiant UI:Context Menu{{#translation:}}|Context Menu Item]]

Latest revision as of 20:30, 19 March 2025

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

A component that is used internally within context menus. If you want to create a custom context menu, you should look at ContextMenuItemSource.

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. Some components stop their functionality when this field is disabled, but some don't.
Highlight Bool Set and unset whether the item is being hovered over and should be highlighted.
Icon Image The icon of this item.
Sprite direct RelayRef`1<IAssetProvider`1<Sprite>> The sprite of this item.
Label IField`1<String> The label element of this item.
Color ColorX The color of this item.
_menu ContextMenu This item's origin context menu.
_highlighted Bool The item is being hovered over.
_arc field drive of Float The arc that makes up this item.
_outerRadius field drive of Float The field that specifies the outer radius of this item.
_button Button The button that makes up this item.

See Also