rojo/.cursor/rules/roblox/reference/engine/classes/PluginMenu.yaml
2026-02-02 12:08:47 -06:00

194 lines
5.1 KiB
YAML

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: PluginMenu
type: class
memory_category: Instances
summary: |
A context menu that can be shown in Studio. Displays a list of
`Class.PluginAction|PluginActions` and supports submenus.
description: |
`PluginMenu` represents a context menu which can be shown in Studio to display
a list of `Class.PluginAction|PluginActions` and which also supports submenus.
A `PluginMenu` must be created using the `Class.Plugin:CreatePluginMenu()`
method in order to work as expected.
code_samples:
- creating-a-pluginaction-and-pluginmenu
inherits:
- Instance
descendants: []
tags:
- NotCreatable
- NotReplicated
deprecation_message: ''
properties:
- name: PluginMenu.Icon
summary: |
The icon to be displayed when used as a submenu.
description: |
This property determines the icon to be displayed when used as a submenu.
It defaults to an empty string `""`.
code_samples: []
type: string
tags:
- NotReplicated
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: false
capabilities: []
- name: PluginMenu.Title
summary: |
The text to be displayed when used as a submenu.
description: |
This property determines the text to be displayed when a
`Class.PluginMenu` is used as a submenu. It defaults to an empty string
`""`.
code_samples: []
type: string
tags:
- NotReplicated
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Appearance
serialization:
can_load: true
can_save: false
capabilities: []
methods:
- name: PluginMenu:AddAction
summary: |
Adds the given action to the menu.
description: |
Adds the given action to the menu.
code_samples: []
parameters:
- name: action
type: Instance
default:
summary: |
The action to add.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
- name: PluginMenu:AddMenu
summary: |
Adds the given menu as a separator.
description: |
Adds the given menu as a separator.
code_samples: []
parameters:
- name: menu
type: Instance
default:
summary: |
The menu to add as a submenu. Uses its `Class.PluginMenu.Title|Title`
and `Class.PluginMenu.Icon|Icon` to display.
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
- name: PluginMenu:AddNewAction
summary: |
Creates a temporary action that is hidden from Studio's customize
shortcuts window.
description: |
Creates a temporary action that is hidden from Studio's **File** ⟩
**Customize Shortcuts** window.
code_samples: []
parameters:
- name: actionId
type: string
default:
summary: |
Must be a unique string that identifies this `Class.PluginAction` from
others.
- name: text
type: string
default:
summary: |
The text to be displayed.
- name: icon
type: string
default:
summary: |
The icon to be displayed.
returns:
- type: Instance
summary: |
The created `Class.PluginAction`.
tags: []
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
- name: PluginMenu:AddSeparator
summary: |
Adds a separator between items in the menu.
description: |
Adds a separator between items in the menu.
code_samples: []
parameters: []
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
- name: PluginMenu:Clear
summary: |
Clears the menu.
description: |
Clears the menu.
code_samples: []
parameters: []
returns:
- type: ()
summary: ''
tags: []
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
- name: PluginMenu:ShowAsync
summary: |
Shows the menu at the mouse cursor. Yields until either an item is
selected or the menu is closed.
description: |
Shows the menu at the mouse cursor. It yields until either an item is
selected or the menu is closed. The selected action fires its
`Class.PluginAction.Triggered` event.
code_samples: []
parameters: []
returns:
- type: Instance
summary: |
The `Class.PluginAction` item that was selected or `nil`.
tags:
- Yields
deprecation_message: ''
security: PluginSecurity
thread_safety: Unsafe
capabilities: []
events: []
callbacks: []