bool isPartSelectionClick() { // NOTE We're checking for "down" state so that we process the click/press sooner than EditorLogic // (and our popup is supposed to block "up" state so that it doesn't go to the EditorLogic). return(editorLogic.editorScreen == EditorLogic.EditorScreen.Parts && editorLogic.PartSelected == null && editorLogic.state != EditorLogic.EditorState.PAD_SELECTED && !editorLogic.mouseOverGUI && ShortcutHelper.IsMatch(partPickerShortcut, MainKeyState.DOWN)); }