RSX Code Reference
    Preparing search index...

    Function menuItem

    • Creates a new menu item attribute. Selecting the item in the menu will trigger the menu item callback.

      Parameters

      • path: string

        Path that determines where in the menu to add the element. All path elements must be separated by /, for example "View/Toolbars/Find".

      • Optionalpriority: number

        Priority determines the position of the menu item relative to its siblings. Higher priority means it will be placed earlier in the menu.

      • Optionalseparator: boolean

        Determines should a separator be inserted just before this element.

      • OptionalactiveCallback: () => boolean

        A lambda that return a boolean that determines if the menu item is available when opened.

      • OptionaldeveloperOnly: boolean

        Signalizes that this menu item should only be available when the Developer Menu CVar is enabled (This CVar is enabled by default on non-deploy builds).

      • Optionalplatform: EnumValue<ShortcutPlatformID>

        The operating system platform to enable the shortcut on.

      • OptionalscriptPlatforms: EnumValueTyped<ScriptingPlatform, number>[]

        The scripting platform to enable the shortcut on.

      • Optionalicon: () => EnumValue<StockIcon, number> | Image

      Returns AttributeDecorator<Attribute>