@turbowarp/types-tw
    Preparing search index...

    Type Alias ScratchGUIEvent

    ScratchGUIEvent:
        | { alertId: string; type: "scratch-gui/alerts/SHOW_ALERT" }
        | {
            data: { extensionId: string; message: string };
            type: "scratch-gui/alerts/SHOW_EXTENSION_ALERT";
        }
        | { index: number; type: "scratch-gui/alerts/CLOSE_ALERT" }
        | { alertId: string; type: "scratch-gui/alerts/CLOSE_ALERT_WITH_ID" }
        | { alertId: string; type: "scratch-gui/alerts/CLOSE_ALERTS_WITH_ID" }
        | {
            state: Partial<ScratchGUIState["assetDrag"]>;
            type: "scratch-gui/asset-drag/DRAG_UPDATE";
        }
        | {
            areBlocksOverGui: boolean;
            type: "scratch-gui/block-drag/BLOCK_DRAG_UPDATE";
        }
        | { type: "scratch-gui/cards/CLOSE_CARDS" }
        | { type: "scratch-gui/cards/SHRINK_EXPAND_CARDS" }
        | { type: "scratch-gui/cards/VIEW_CARDS" }
        | { activeDeckId: Deck; type: "scratch-gui/cards/ACTIVATE_DECK" }
        | { type: "scratch-gui/cards/NEXT_STEP" }
        | { type: "scratch-gui/cards/PREV_STEP" }
        | { type: "scratch-gui/cards/DRAG_CARD"; x: number; y: number }
        | { type: "scratch-gui/cards/START_DRAG" }
        | { type: "scratch-gui/cards/END_DRAG" }
        | {
            callback: ScratchGUIState["colorPicker"]["callback"];
            type: "scratch-gui/color-picker/ACTIVATE_COLOR_PICKER";
        }
        | {
            color: string;
            type: "scratch-gui/color-picker/DEACTIVATE_COLOR_PICKER";
        }
        | {
            callback: ScratchGUIState["colorPicker"]["callback"];
            type: "scratch-gui/color-picker/SET_CALLBACK";
        }
        | {
            extensionId: string
            | null;
            type: "scratch-gui/connection-modal/setId";
        }
        | {
            mutator: Element;
            type: "scratch-gui/custom-procedures/ACTIVATE_CUSTOM_PROCEDURES";
            callback(mutation: Element): void;
        }
        | {
            mutator: Element
            | null;
            type: "scratch-gui/custom-procedures/DEACTIVATE_CUSTOM_PROCEDURES";
        }
        | {
            type: "scratch-gui/custom-procedures/SET_CALLBACK";
            callback(mutation: Element): void;
        }
        | {
            activeTabIndex: ActiveTabIndex;
            type: "scratch-gui/navigation/ACTIVATE_TAB";
        }
        | { loaded: boolean; type: "fontsLoaded/SET_FONTS_LOADED" }
        | {
            spriteId: string | null;
            type: "scratch-gui/hovered-target/SET_HOVERED_SPRITE";
        }
        | {
            receivedBlocks: boolean;
            type: "scratch-gui/hovered-target/SET_RECEIVED_BLOCKS";
        }
        | { menu: ScratchGUI.Menu; type: "scratch-gui/menus/OPEN_MENU" }
        | { menu: ScratchGUI.Menu; type: "scratch-gui/menus/CLOSE_MENU" }
        | { type: "scratch-gui/mic-indicator/UPDATE"; visible: boolean }
        | { modal: ScratchGUI.Modal; type: "scratch-gui/modals/OPEN_MODAL" }
        | { modal: ScratchGUI.Modal; type: "scratch-gui/modals/CLOSE_MODAL" }
        | { isFullScreen: boolean; type: "scratch-gui/mode/SET_FULL_SCREEN" }
        | { isPlayerOnly: boolean; type: "scratch-gui/mode/SET_PLAYER" }
        | {
            lowerEnd: { x: number; y: number };
            monitorId: string;
            savePosition: boolean;
            type: "scratch-gui/monitors/ADD_MONITOR_RECT";
            upperStart: { x: number; y: number };
        }
        | {
            monitorId: string;
            newX: number;
            newY: number;
            type: "scratch-gui/monitors/MOVE_MONITOR_RECT";
        }
        | {
            monitorId: string;
            newHeight: number;
            newWidth: number;
            type: "scratch-gui/monitors/RESIZE_MONITOR_RECT";
        }
        | { monitorId: string; type: "scratch-gui/monitors/REMOVE_MONITOR_RECT" }
        | { type: "scratch-gui/monitors/RESET_MONITOR_LAYOUT" }
        | { monitors: OrderedMap; type: "scratch-gui/monitors/UPDATE_MONITORS" }
        | {
            changed: boolean;
            type: "scratch-gui/project-changed/SET_PROJECT_CHANGED";
        }
        | {
            projectId: string;
            type: "scratch-gui/project-state/DONE_CREATING_COPY";
        }
        | {
            projectId: string;
            type: "scratch-gui/project-state/DONE_CREATING_NEW";
        }
        | {
            projectData: ProjectData;
            type: "scratch-gui/project-state/DONE_FETCHING_DEFAULT";
        }
        | {
            projectData: ProjectData;
            type: "scratch-gui/project-state/DONE_FETCHING_WITH_ID";
        }
        | { type: "scratch-gui/project-state/DONE_LOADING_VM_TO_SAVE" }
        | { type: "scratch-gui/project-state/DONE_LOADING_VM_WITH_ID" }
        | { type: "scratch-gui/project-state/DONE_LOADING_VM_WITHOUT_ID" }
        | { projectId: string; type: "scratch-gui/project-state/DONE_REMIXING" }
        | { type: "scratch-gui/project-state/DONE_UPDATING" }
        | { type: "scratch-gui/project-state/DONE_UPDATING_BEFORE_COPY" }
        | { type: "scratch-gui/project-state/DONE_UPDATING_BEFORE_NEW" }
        | { type: "scratch-gui/project-state/RETURN_TO_SHOWING" }
        | { projectId: string; type: "scratch-gui/project-state/SET_PROJECT_ID" }
        | { type: "scratch-gui/project-state/START_AUTO_UPDATING" }
        | { type: "scratch-gui/project-state/START_CREATING_NEW" }
        | { error: unknown; type: "scratch-gui/project-state/START_ERROR" }
        | { type: "scratch-gui/project-state/START_FETCHING_NEW" }
        | { type: "scratch-gui/project-state/START_LOADING_VM_FILE_UPLOAD" }
        | { type: "scratch-gui/project-state/START_MANUAL_UPDATING" }
        | { type: "scratch-gui/project-state/START_REMIXING" }
        | { type: "scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_COPY" }
        | { type: "scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_NEW" }
        | { title: string; type: "projectTitle/SET_PROJECT_TITLE" }
        | {
            state: ScratchGUIState["restoreDeletion"];
            type: "scratch-gui/restore-deletion/RESTORE_UPDATE";
        }
        | {
            stageSize: StageDisplaySize;
            type: "scratch-gui/StageSize/SET_STAGE_SIZE";
        }
        | {
            editingTarget: string
            | null;
            targets: RenderedTarget[];
            type: "scratch-gui/targets/UPDATE_TARGET_LIST";
        }
        | {
            targetId: string;
            type: "scratch-gui/targets/HIGHLIGHT_TARGET";
            updateTime: number;
        }
        | { id: number
        | null; type: "timeout/SET_AUTOSAVE_TIMEOUT_ID" }
        | { toolboxXML: string; type: "scratch-gui/toolbox/UPDATE_TOOLBOX" }
        | { running: boolean; type: "scratch-gui/vm-status/SET_RUNNING_STATE" }
        | { turbo: boolean; type: "scratch-gui/vm-status/SET_TURBO_STATE" }
        | { started: boolean; type: "scratch-gui/vm-status/SET_STARTED_STATE" }
        | { type: "scratch-gui/vm/SET_VM"; vm: VM }
        | {
            scale: number;
            scrollX: number;
            scrollY: number;
            targetID: string;
            type: "scratch-gui/workspace-metrics/UPDATE_METRICS";
        }

    Type Declaration

    • { alertId: string; type: "scratch-gui/alerts/SHOW_ALERT" }
    • {
          data: { extensionId: string; message: string };
          type: "scratch-gui/alerts/SHOW_EXTENSION_ALERT";
      }
    • { index: number; type: "scratch-gui/alerts/CLOSE_ALERT" }
    • { alertId: string; type: "scratch-gui/alerts/CLOSE_ALERT_WITH_ID" }
    • { alertId: string; type: "scratch-gui/alerts/CLOSE_ALERTS_WITH_ID" }
    • {
          state: Partial<ScratchGUIState["assetDrag"]>;
          type: "scratch-gui/asset-drag/DRAG_UPDATE";
      }
    • { areBlocksOverGui: boolean; type: "scratch-gui/block-drag/BLOCK_DRAG_UPDATE" }
    • { type: "scratch-gui/cards/CLOSE_CARDS" }
    • { type: "scratch-gui/cards/SHRINK_EXPAND_CARDS" }
    • { type: "scratch-gui/cards/VIEW_CARDS" }
    • { activeDeckId: Deck; type: "scratch-gui/cards/ACTIVATE_DECK" }
    • { type: "scratch-gui/cards/NEXT_STEP" }
    • { type: "scratch-gui/cards/PREV_STEP" }
    • { type: "scratch-gui/cards/DRAG_CARD"; x: number; y: number }
    • { type: "scratch-gui/cards/START_DRAG" }
    • { type: "scratch-gui/cards/END_DRAG" }
    • {
          callback: ScratchGUIState["colorPicker"]["callback"];
          type: "scratch-gui/color-picker/ACTIVATE_COLOR_PICKER";
      }
    • { color: string; type: "scratch-gui/color-picker/DEACTIVATE_COLOR_PICKER" }
    • {
          callback: ScratchGUIState["colorPicker"]["callback"];
          type: "scratch-gui/color-picker/SET_CALLBACK";
      }
    • { extensionId: string | null; type: "scratch-gui/connection-modal/setId" }
    • {
          mutator: Element;
          type: "scratch-gui/custom-procedures/ACTIVATE_CUSTOM_PROCEDURES";
          callback(mutation: Element): void;
      }
    • {
          mutator: Element | null;
          type: "scratch-gui/custom-procedures/DEACTIVATE_CUSTOM_PROCEDURES";
      }
    • {
          type: "scratch-gui/custom-procedures/SET_CALLBACK";
          callback(mutation: Element): void;
      }
    • { activeTabIndex: ActiveTabIndex; type: "scratch-gui/navigation/ACTIVATE_TAB" }
    • { loaded: boolean; type: "fontsLoaded/SET_FONTS_LOADED" }
    • {
          spriteId: string | null;
          type: "scratch-gui/hovered-target/SET_HOVERED_SPRITE";
      }
    • {
          receivedBlocks: boolean;
          type: "scratch-gui/hovered-target/SET_RECEIVED_BLOCKS";
      }
    • { menu: ScratchGUI.Menu; type: "scratch-gui/menus/OPEN_MENU" }
    • { menu: ScratchGUI.Menu; type: "scratch-gui/menus/CLOSE_MENU" }
    • { type: "scratch-gui/mic-indicator/UPDATE"; visible: boolean }
    • { modal: ScratchGUI.Modal; type: "scratch-gui/modals/OPEN_MODAL" }
    • { modal: ScratchGUI.Modal; type: "scratch-gui/modals/CLOSE_MODAL" }
    • { isFullScreen: boolean; type: "scratch-gui/mode/SET_FULL_SCREEN" }
    • { isPlayerOnly: boolean; type: "scratch-gui/mode/SET_PLAYER" }
    • {
          lowerEnd: { x: number; y: number };
          monitorId: string;
          savePosition: boolean;
          type: "scratch-gui/monitors/ADD_MONITOR_RECT";
          upperStart: { x: number; y: number };
      }
    • {
          monitorId: string;
          newX: number;
          newY: number;
          type: "scratch-gui/monitors/MOVE_MONITOR_RECT";
      }
    • {
          monitorId: string;
          newHeight: number;
          newWidth: number;
          type: "scratch-gui/monitors/RESIZE_MONITOR_RECT";
      }
    • { monitorId: string; type: "scratch-gui/monitors/REMOVE_MONITOR_RECT" }
    • { type: "scratch-gui/monitors/RESET_MONITOR_LAYOUT" }
    • { monitors: OrderedMap; type: "scratch-gui/monitors/UPDATE_MONITORS" }
    • { changed: boolean; type: "scratch-gui/project-changed/SET_PROJECT_CHANGED" }
    • { projectId: string; type: "scratch-gui/project-state/DONE_CREATING_COPY" }
    • { projectId: string; type: "scratch-gui/project-state/DONE_CREATING_NEW" }
    • {
          projectData: ProjectData;
          type: "scratch-gui/project-state/DONE_FETCHING_DEFAULT";
      }
    • {
          projectData: ProjectData;
          type: "scratch-gui/project-state/DONE_FETCHING_WITH_ID";
      }
    • { type: "scratch-gui/project-state/DONE_LOADING_VM_TO_SAVE" }
    • { type: "scratch-gui/project-state/DONE_LOADING_VM_WITH_ID" }
    • { type: "scratch-gui/project-state/DONE_LOADING_VM_WITHOUT_ID" }
    • { projectId: string; type: "scratch-gui/project-state/DONE_REMIXING" }
    • { type: "scratch-gui/project-state/DONE_UPDATING" }
    • { type: "scratch-gui/project-state/DONE_UPDATING_BEFORE_COPY" }
    • { type: "scratch-gui/project-state/DONE_UPDATING_BEFORE_NEW" }
    • { type: "scratch-gui/project-state/RETURN_TO_SHOWING" }
    • { projectId: string; type: "scratch-gui/project-state/SET_PROJECT_ID" }
    • { type: "scratch-gui/project-state/START_AUTO_UPDATING" }
    • { type: "scratch-gui/project-state/START_CREATING_NEW" }
    • { error: unknown; type: "scratch-gui/project-state/START_ERROR" }
    • { type: "scratch-gui/project-state/START_FETCHING_NEW" }
    • { type: "scratch-gui/project-state/START_LOADING_VM_FILE_UPLOAD" }
    • { type: "scratch-gui/project-state/START_MANUAL_UPDATING" }
    • { type: "scratch-gui/project-state/START_REMIXING" }
    • { type: "scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_COPY" }
    • { type: "scratch-gui/project-state/START_UPDATING_BEFORE_CREATING_NEW" }
    • { title: string; type: "projectTitle/SET_PROJECT_TITLE" }
    • {
          state: ScratchGUIState["restoreDeletion"];
          type: "scratch-gui/restore-deletion/RESTORE_UPDATE";
      }
    • { stageSize: StageDisplaySize; type: "scratch-gui/StageSize/SET_STAGE_SIZE" }
      • stageSize: StageDisplaySize

        Should only be large or small.

      • type: "scratch-gui/StageSize/SET_STAGE_SIZE"
    • {
          editingTarget: string | null;
          targets: RenderedTarget[];
          type: "scratch-gui/targets/UPDATE_TARGET_LIST";
      }
    • {
          targetId: string;
          type: "scratch-gui/targets/HIGHLIGHT_TARGET";
          updateTime: number;
      }
      • targetId: string
      • type: "scratch-gui/targets/HIGHLIGHT_TARGET"
      • updateTime: number

        Set to Date.now()

    • { id: number | null; type: "timeout/SET_AUTOSAVE_TIMEOUT_ID" }
    • { toolboxXML: string; type: "scratch-gui/toolbox/UPDATE_TOOLBOX" }
    • { running: boolean; type: "scratch-gui/vm-status/SET_RUNNING_STATE" }
    • { turbo: boolean; type: "scratch-gui/vm-status/SET_TURBO_STATE" }
    • { started: boolean; type: "scratch-gui/vm-status/SET_STARTED_STATE" }
    • { type: "scratch-gui/vm/SET_VM"; vm: VM }
    • {
          scale: number;
          scrollX: number;
          scrollY: number;
          targetID: string;
          type: "scratch-gui/workspace-metrics/UPDATE_METRICS";
      }