接口 ISimpleTool实验性

The simple tool wrapper will create, bind and manage the lifecycle of all the desired components. The wrapper is designed to obfuscate and simplify the process of creating a simple editor tool so that a creator can get on with the job of just creating the tool functionality without getting mired in the irrelevant details of component lifecycle and visibility management. The wrapper will also attempt to codify particular implementation patterns and requirements that are common to all editor tools, and enforce them in a consistent way. It should also go some way to insulating the creator from underlying system and implementation changes as the editor evolves.

interface ISimpleTool {
    get id(): string;
    get menu(): IMenu;
    get name(): string;
    get pane(): ISimpleToolPaneComponent;
    get session(): IPlayerUISession<Record<string, never>>;
    get statusBar(): ISimpleToolStatusBarComponent;
    get toolRail(): ISimpleToolRailComponent;
    findPane(idString: string): ISimpleToolPaneComponent;
    hidePane(idString?: string): void;
    logDebug(message: string): void;
    logError(message: string): void;
    logInfo(message: string): void;
    logWarn(message: string): void;
    showPane(idString?: string): void;
    showPaneExclusively(idString: string): void;
    teardown(): void;
}

访问器

  • 实验性

    返回 IMenu

    Get a reference to the menu component that was automatically created for the tool This generally only happens if the tool is a global tool (i.e. has a pane and does not have a tool rail component) In this case a menu item is automatically created and some visibility controls are inserted. If you have additional menu options you want to add, this is the ideal control to add children to

方法

  • 实验性

    参数

    • 可选idString: string

    返回 void

    Hide a particular pane or subpane by it's unique ID. If no ID is provided (or cannot be found) the function will throw an error Although the parent pane is used to execute the visibility request, the hidePane function will NOT affect the visibility of any sibling panes -- so it is possible to hide all of the child panes of a parent using this function

  • 实验性

    参数

    • message: string

    返回 void

    Send a tagged Debug log message to the console. The tag will contain the tool name

  • 实验性

    参数

    • message: string

    返回 void

    Send a tagged Error log message to the console. The tag will contain the tool name

  • 实验性

    参数

    • message: string

    返回 void

    Send a tagged Informational log message to the console. The tag will contain the tool name

  • 实验性

    参数

    • message: string

    返回 void

    Send a tagged Warning log message to the console. The tag will contain the tool name

  • 实验性

    参数

    • 可选idString: string

    返回 void

    Show a particular pane or subpane by it's unique ID. If no ID is provided (or cannot be found) the function will throw an error Note that the showPane function (when used with a child pane) will use the parent pane to execute the visibility request. In this case, if the child panes are marked as mututally exclusive, then the siblings of the requested pane will be hidden

  • 实验性

    参数

    • idString: string

    返回 void

    Much like the showPane function, but will hide all other panes that are not the requested pane irrespective of the exclusivity setting

  • 实验性

    返回 void

    A teardown function implemented by the ISimpleTool implementation, and is called by the system during editor extension shutdown. Don't override this function - instead, implement the onTeardown event in the ISimpleToolOptions structure