Example #1
0
 void PruneMenuContent(int WindowID)
 {
     _showPruneMenu = ShowMenuState.visible;
     if (GUILayout.Button("Block all"))
     {
         if (!blackList.ContainsKey(_icon.partInfo.name))
         {
             addToBlackList(_icon.partInfo.name, _icon.partInfo.title, blackListType.ALL);
         }
     }
     if (EditorDriver.editorFacility == EditorFacility.VAB)
     {
         if (GUILayout.Button("Block VAB"))
         {
             Log.Info("Block VAB: " + _icon.partInfo.name);
             addToBlackList(_icon.partInfo.name, _icon.partInfo.title, blackListType.VAB);
         }
     }
     if (EditorDriver.editorFacility == EditorFacility.SPH)
     {
         if (GUILayout.Button("Block SPH"))
         {
             addToBlackList(_icon.partInfo.name, _icon.partInfo.title, blackListType.SPH);
         }
     }
 }
Example #2
0
        public void ShowPruneMenu()
        {
            InputLockManager.SetControlLock(ControlTypes.EDITOR_ICON_PICK | ControlTypes.EDITOR_ICON_HOVER, "Pruner");

            Vector3 position = Input.mousePosition;

            //Log.Info("X, Y: " + position.x.ToString() + ", " + position.y.ToString());

            if (position.y + _pruneMenuHeight > Screen.height)
            {
                position.y = Screen.height - _pruneMenuHeight;
            }

            position.y    -= 10;
            _pruneMenuRect = new Rect()
            {
                xMin = position.x - _pruneMenuWidth / 2,
                xMax = position.x + _pruneMenuWidth / 2,
                yMin = Screen.height - position.y - _pruneMenuHeight,
                yMax = Screen.height - position.y
            };
            _showPruneMenu = ShowMenuState.starting;
            pruneMenuID    = JanitorsCloset.getNextID();
        }
Example #3
0
 public void HidePruneMenu()
 {
     _showPruneMenu = ShowMenuState.hidden;
     _pruneMenuRect = new Rect();
     InputLockManager.RemoveControlLock("Pruner");
 }