Пример #1
0
 private void SetupGizmo()
 {
     origLocalPosition = selectedInstance.transform.localPosition;
     if (referenceSystem == Reference.Center)
     {
         EditorGizmo.SetupMoveGizmo(selectedInstance.gameObject, selectedInstance.transform.localRotation, OnMoveCB, WhenMovedCB);
     }
     else
     {
         EditorGizmo.SetupMoveGizmo(selectedInstance.gameObject, Quaternion.identity, OnMoveCB, WhenMovedCB);
     }
 }
Пример #2
0
        public override void Close()
        {
            if (KerbalKonstructs.camControl.active)
            {
                KerbalKonstructs.camControl.disable();
            }

            CloseVectors();
            EditorGizmo.CloseGizmo();
            base.Close();
            selectedDecal = null;
        }
Пример #3
0
        public void Close()
        {
            SetActive(false);
            if (KerbalKonstructs.camControl.active)
            {
                KerbalKonstructs.camControl.disable();
            }

            EditorGizmo.CloseGizmo();
            CloseEditors();
            selectedObjectPrevious = null;
        }
Пример #4
0
 public void Open()
 {
     UpdateUI();
     if (selectedObjectPrevious != selectedGroup)
     {
         selectedObjectPrevious = selectedGroup;
         EditorGizmo.SetupMoveGizmo(selectedGroup.gameObject, Quaternion.identity, OnMoveCallBack, WhenMovedCallBack);
         if (!KerbalKonstructs.camControl.active)
         {
             KerbalKonstructs.camControl.enable(selectedGroup.gameObject);
         }
     }
     SetActive(true);
 }
Пример #5
0
        /// <summary>
        /// Wrapper to draw editors
        /// </summary>
        /// <param name="groupCenter"></param>
        internal void drawEditor(GroupCenter groupCenter)
        {
            if (groupCenter == null)
            {
                return;
            }

            if (selectedObjectPrevious != groupCenter)
            {
                selectedObjectPrevious = groupCenter;
                SetupVectors();
                UpdateStrings();
                EditorGizmo.SetupMoveGizmo(groupCenter.gameObject, Quaternion.identity, OnMoveCallBack, WhenMovedCallBack);
                if (!KerbalKonstructs.camControl.active)
                {
                    KerbalKonstructs.camControl.enable(groupCenter.gameObject);
                }
            }

            toolRect = GUI.Window(0xB07B1E3, toolRect, GroupEditorWindow, "", UIMain.KKWindow);
        }
Пример #6
0
 private void UpdateGizmo()
 {
     EditorGizmo.CloseGizmo();
     SetupGizmo();
 }
Пример #7
0
 private void CloseGizmo()
 {
     EditorGizmo.CloseGizmo();
 }
Пример #8
0
 internal void UpdateMoveGizmo()
 {
     EditorGizmo.CloseGizmo();
     EditorGizmo.SetupMoveGizmo(selectedDecal.gameObject, Quaternion.identity, OnMoveCallBack, WhenMovedCallBack);
 }