RSX Code Reference
    Preparing search index...

    Function libraryOnOpenResource

    • An attribute that can be added to a static method to handle the open-event of a Resource type in the library. Resources can be opened by double-clicking them in the library, or through other means, such as context or file menus. This attribute enables developers to present custom editing window such as ResourceKeyWindowBase to view or edit the clicked resource.

      Type Parameters

      Parameters

      • type: ClassOf<T>

        The resource type to handle.

      • displayName: string

        The name of the action, when displayed in the UI.

      • OptionalfnOnIsAvailable: (
            resourceEntry: ResourceEntry,
            action: LibraryOnOpenResourceActionTypes,
        ) => boolean

        An optional callback to determine if the open action is available for the specified resource.

      Returns AttributeDecorator<Attribute>

      The method must have the following signature