예제 #1
0
 private void toggle_quick_tag()
 {
     if (QuickTag.instance)
     {
         QuickTag.close();
     }
     else
     {
         CraftManager.main_ui.open_quick_tag();
     }
 }
예제 #2
0
        protected override void key_event_handler()
        {
            Event e = Event.current;

            if (e.type == EventType.KeyDown)
            {
                //'esc' - close interface
                if (e.keyCode == KeyCode.Escape)
                {
                    e.Use();
                    QuickTag.close();
                }
            }
        }
예제 #3
0
 public void Update()
 {
     if (CraftManager.use_editor_key_shortcuts && !CraftManager.main_ui.visible)
     {
         if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
         {
             if (Input.GetKeyDown(KeyCode.O))
             {
                 CraftManager.main_ui.show();
             }
             else if (Input.GetKeyDown(KeyCode.S))
             {
                 if (EditorLogic.fetch.saveBtn.enabled)
                 {
                     EditorLogic.fetch.saveBtn.onClick.Invoke();
                     ScreenMessages.PostScreenMessage("Craft Saved!");
                 }
             }
             else if (Input.GetKeyDown(KeyCode.N))
             {
                 EditorLogic.fetch.newBtn.onClick.Invoke();
             }
             else if (Input.GetKeyDown(KeyCode.T))
             {
                 if (QuickTag.instance == null)
                 {
                     QuickTag.open(gameObject);
                 }
                 else
                 {
                     QuickTag.close();
                 }
             }
         }
     }
 }